search for: railsway

Displaying 2 results from an estimated 2 matches for "railsway".

Did you mean: railsday
2008 Dec 13
3
how to do "special queries" ala The Rails Way on "associated" conditions?
...player_stats.each do |stat| stats << stat if stat.player.team.team_code == self.home_team_code end stats end end I understand that this isn''t the most efficient or elegant way to do things. I gleaned this most recently from the posting at (see his Case 3): http://www.therailsway.com/tags/has_many So, I would like to do something like the following, but I''m having a problem with the conditions: has_many :visitor_stats, :class_name=>"PlayerStat", :conditions=> <what???> the condition here should be something matching "player.team.team_...
2005 Sep 22
5
Adding Categories to the Depot example in the Agile Rails book
Hi ya, I want to add categories to the depot example in the Agile rails book. These are my thoughts: Create a new table called categories with id, title, description, and image fields. Add a new field to the products table called category_id Create a model called Category with "has_many :products" Now I should have a one to many link between the products and categories tables? Now