daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Product < ActiveRecord::Base  
  2.   has_many :reviews  
  3. end  
  4.  
  5. class Review < ActiveRecord::Base  
  6.   belongs_to :product  
  7. end
  8.    
  9. Product.find(:all, :include => 'reviews', :conditions => ['review.rating > ?', min_rating])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top