search for: item_top

Displaying 1 result from an estimated 1 matches for "item_top".

Did you mean: itemtop
2008 Jul 12
3
calculations on nested resources
...can''t seem to find a solution to the folowing problem. I have 3 resources that are all bound to eachother like this: class Item < ActiveRecord::Base belongs_to :item_category // has a date and amount attr end class ItemCategory < ActiveRecord::Base has_many :items has_many :item_tops // groups the items in categories end class ItemTop < ActiveRecord::Base belongs_to :item_category // has a start and stop date and an amount attr end The thing I would like to do now starts from the ItemTop resource. When I do a search, it will search for all ItemTop resources where th...