Tagged Questions
Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.
0
votes
3answers
6 views
create action for has_many :through
I have models like this:
User
Paper
Subscription
As you can see there is has_many :through relationship and the Subscription stores :user_id and :paper_id
Paper has its own controller and its ...
0
votes
3answers
15 views
Premature end of char-class
I had the regular expression for email validating following rules
The local-part of the e-mail address may use any of these ASCII characters:
Uppercase and lowercase English letters (a-z, A-Z)
...
0
votes
0answers
5 views
Problems with commenting systems
I made a website in which people can share photo's (they are called pins in my code). I wanted to add a system in which, when someone clicks on the picture, they can comment on it. I decided to use ...
0
votes
0answers
16 views
How to save multiple forms in same page tabs
Ok so I have 7 tabs one for each day of the week. Under each tab I have three more tabs for daily events. I am trying to make it so that each event has a hardcoded date corresponding to each day of ...
0
votes
0answers
7 views
routing-filter does not work on rails 4
I am trying to convert ?locale=en in routes to /en/ I found routing-filter gem
but if I try to run rails, I get this error:
samir@samir-VirtualBox:~/RubymineProjects/dcaclab$ rails s
...
0
votes
1answer
7 views
search page routing error in ruby on rails
I have a search page and a search button on it, and when I click on the search button, it gave me an error below:
No route matches [POST] "/searching"
And I want that when I click on the search ...
0
votes
0answers
7 views
Rails ajax flash with unobtrusive-messages
I'm using the gem unobtrusive_flash to get my flash messages to work easily for all my ajax calls/remote forms.
I just need a little help with the jQuery to get my animations working properly. What I ...
0
votes
0answers
2 views
ExtJS rest proxy not send actual request to rails server after get response code 200
I recently want to implement rails4 API with ExtJS 4.2.2 as front-end framework.
-Rails 4 using REST ==> http://localhost:3000
-ExtJS also use rest proxy ==> http://localhost:1841
so when request ...
0
votes
0answers
18 views
git push heroku master - require passphrase
today I learned to deploy my project using heroku. When I type:
git push heroku master
the heroku promt to enter passphase:
Enter passphrase for key '/home/hien/.ssh/':
I'm very confused because ...
0
votes
0answers
5 views
Rails image disappears with error: Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
Essentially my problem is that a page loads fine and looks normal. After about 30 seconds it suddenly disappears.
Here's the server log before the error (as loading the page):
Started GET "/" for ...
-1
votes
0answers
10 views
Sorting users by merit points
What's the best way to order a users list by their merit points. I'm having difficulty doing so because merit probably doesn't save it's data in the db.
So far, I'm caching merit points in the users ...
0
votes
0answers
5 views
AWS Deployment with Rails - Inaccessible
Could you tell me what happens with AWS Server now? From 3 weeks ago, util now, whenever I deploy my RoR app into AWS Server (using ElasticBeantalk tool), I meet a strange issue
Deployment time is ...
1
vote
3answers
21 views
How to do “redirect_to and return” to exit fully or redirect_to immediately?
I have this as my code:
def index
@monkeys = Monkey.where(owner: current_user)
end
def new
@monkey = Monkey.new name: 'Monkey 1', alive: true, owner: current_user
end
def create
@monkey = ...
0
votes
1answer
9 views
Rails 4 - JS Pipeline, put after require_tree
I have app.js which depends on around 10 other JS. So I want to put app.js last in the order
//= require_tree .
//= require app
But the way above doesn't work and still list them alphabetically.
I ...
2
votes
1answer
13 views
How to batch-create posts?
I have a bookmark controller which has the seven default RESTful actions.
I would like to have a form for batch bookmark creation.
It's going to have a textarea field where the user can enter URLs, ...