a guest Jun 13th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- class Product < ActiveRecord::Base
- has_many :reviews
- class Review < ActiveRecord::Base
- belongs_to :product
- Product.find(:all, :include => 'reviews', :conditions => ['review.rating > ?', min_rating])
RAW Paste Data