> [...] Hence I am trying to apply the where condition on
> @restaurants, using �...@restaurants = @restaurants.where("cuisine
> like ?", params[:cuisine]). But that doesn't work.

Once you've gotten @restaurants you are not querying the DB anymore,
hence the 'where' should give you an error. @restaurants is in essence
an array and will not have a 'where' method in it unless you add it.
Look into the Ruby methods for Array (http://ruby-doc.org/core/classes/
Array.html) and you'll probably find what you're looking for.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to