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.

learn more… | top users | synonyms (2) | ruby on rails jobs

0
votes
2answers
18 views

truncate all data in model and restart the id

I have several records in my Category model. All of them are test data. Now I want to clear the data. if I issue Category.destroy_all or Category.delete_all all the records are deleted. However, any ...
0
votes
1answer
15 views

Devise: I added a username field, but it's not working

I've added my a username field to my User model, but it seems that devise isn't recognizing it when creating a new user record. I fill out the email, username and password, but I get a validation ...
-1
votes
1answer
27 views

Ruby Warrior Level 8 - my solution not working?

I cannot determine why this is not working. I throw it in irb and it works fine.. Please let me know if you see the issue My Code: class Player def play_turn(warrior) @warrior = warrior ...
0
votes
2answers
14 views

How to make a rails app arrange user posts(events) by date and delete events that have passed?

I set up an event listing site and would like rails to automatically sort these links(events) by date and delete them after the day has passed. After extensive reading, I assume deleting posts that ...
0
votes
0answers
14 views

Rails - any reason to keep assets logging in production?

I find the asset logging not quite useful during development and I'm thinking about using the quiet_assets gem to disable asset logging in production. Is that a good idea? Any reason why I should care ...
0
votes
1answer
9 views

getting parent in self referential model

Based on http://guides.rubyonrails.org/association_basics.html#self-joins I created a self join model called Category rails g model Category name parent_id:integer I altered the model category.rb ...
1
vote
0answers
26 views

Heroku & Rails 3.2 We're sorry but something went wrong

I'm having a really bad day at this: #rails-noob #githubsucks #herokufail #abouttosmashmylaptop. Ok, I feel better. I have created an app using Rails 3.2.12/ruby 1.9.3. It's working locally - no ...
0
votes
0answers
8 views

how to write white list in rails to match front end filter rules

How to write white list in rails to match front end filter rules? When I used rich text editors on front end, how should I write white list on rails? I found it requires to write too many filter ...
0
votes
1answer
13 views

how to implement bootstrap 2.3.3 dropdown

I'm following this: http://getbootstrap.com/2.3.2/javascript.html#dropdowns 1) It says: To keep URLs intact, use the data-target attribute instead of href="#". and then href="/page.html". I assume ...
0
votes
0answers
10 views

Rails 4 - manifest JS not available in AJAXed-in JS rendered partial

Good evening SO, I am having issues gaining access to javascript functions in manifest files when rendering a JS partial. Below are the files which make the current articles#index page work: ...
0
votes
0answers
9 views

Re-populating dropdown menu with database value (rails)

When going to the Edit view of a form, with values previously posted to a database, all the fields get re-populated except for the drop-down menu field. For example, the "Surprised" value is now in ...
0
votes
0answers
16 views

Is it possible to disable default catchall rendering in Rails?

I've been trying to learn how rails handles it's response and rendering, and as such I've been having problems asking the "right" question. What I'd like to do, keep using a RESTful route setup but ...
0
votes
0answers
10 views

How to populate an app with blog feeds?

Sorry for the verbose title. So, I have an project seen here: www.leapfm.com that allows users to upload and vote up songs. However, the app will only be useful if users are constantly adding new ...
0
votes
0answers
14 views

can't populate db using rake db:populate

I am trying to populate my db using rake db:populate. I am on chapter 10.3.2 on michael hartl's book. Even though I don't get any error messages the DB doesn't seem to be populating. This is the ...
0
votes
0answers
10 views

Select records where at least some has_many relations are in the future

I have activities which have_many events - events are the date and time the activities occur. In my activities index, I want to list all activities that have at least one event in the future. ...

1 2 3 4 5 8366
15 30 50 per page