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
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
Hello, Does anyone have any clues about this one??? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
http://rails.co.za/articles/2006/06/04/acts_as_taggable-plugin-docs cammo wrote:> Hello, > Does anyone have any clues about this one??? > > > > > > >-- about me: My greatest achievement was when all the other kids just learnt to count from 1 to 10, i was counting (0..9) - gustav.paul --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---