Tuesday, October 19, 2010

Data modelling in Rails

http://www.mongodb.org/display/DOCS/MongoDB+Data+Modeling+and+Rails

To find all the stories voted on by a given user:
Story.all(:conditions => {:voters => @user.id}) 
 
http://biodegradablegeek.com/2008/07/how-to-use-fixtures-to-populate-your-database-in-rails/ 
$ rake db:fixtures:load

No comments: