Guest User

Untitled

a guest
Apr 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. @results = Product.find(:all, :conditions => conditions, :order => 'weight ASC, id ASC').inject([]) do |result_array, product|
  2. result_array << {:product => product, :shoe_sizes => product.shoe_sizes.find(:all, :conditions => ["min_weight >= ? AND max_weight <= ?"])}
  3. end
Add Comment
Please, Sign In to add comment