Needing to search my tags with multiple words sent to the controller
from a form helper. This works if I only use one param - like this:
@cameras = Camera.find_tagged_with(@tag)
But if I run this:
@cameras = Camera.find_tagged_with(:any => @tag)
then I get nothing returned, even if @tag=params[:camera][:gps]
It seems like the :any => action isn’t working? Please find my full
controller script below
def findcamera
if request.post?
res = params[:camera][:resolution]
brd = params[:brand][:brand]
@tag = params[:camera][:gps], params[:camera][:sturdy],
params[:camera][:macro], params[:camera][:stylish]
@cameras = Camera.find_tagged_with (:any => @tag, :separator =>
“,”, :conditions => [“resolution=? AND brand=?”, res, brd])
end
end