Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if params[:search]
- @products = Product.find(:all, :conditions => ['name LIKE ?', "%#{params[:search]}%"])
- else
- @products = Product.all
- end
- @products = Product.find(:all, :conditions => ["what should be here"])
Add Comment
Please, Sign In to add comment