Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @results = Product.find(:all, :conditions => conditions, :order => 'weight ASC, id ASC').inject([]) do |result_array, product|
- result_array << {:product => product, :shoe_sizes => product.shoe_sizes.find(:all, :conditions => ["min_weight >= ? AND max_weight <= ?"])}
- end
Add Comment
Please, Sign In to add comment