Guest User

Untitled

a guest
Jan 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. if params[:search]
  2. @products = Product.find(:all, :conditions => ['name LIKE ?', "%#{params[:search]}%"])
  3. else
  4. @products = Product.all
  5. end
  6.  
  7. @products = Product.find(:all, :conditions => ["what should be here"])
Add Comment
Please, Sign In to add comment