Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Product < ActiveRecord::Base
- has_many :reviews
- end
- class Review < ActiveRecord::Base
- belongs_to :product
- end
- Product.find(:all, :include => 'reviews', :conditions => ['review.rating > ?', min_rating])
Add Comment
Please, Sign In to add comment