This won''t post with a full code paste, so I''ve got to link it to another forum where I''ve posted it. http://www.railsweenie.com/forums/1/topics/1053 Can''t get the acts_as_taggable plugin to play nice. Works in console, not in teh view. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 26, 2006, at 11:03 PM, boboroshi wrote:> > This won''t post with a full code paste, so I''ve got to link it to > another forum where I''ve posted it. > > http://www.railsweenie.com/forums/1/topics/1053 > > Can''t get the acts_as_taggable plugin to play nice. Works in console, > not in teh view.You''re not showing your routes.rb, so I can''t be sure, but it looks like you need to setup a route for this... = in config/routes.rb map.connect ''/elements/tagged/:tag_name'', :controller => ''elements'', :action => ''tagged'' = end Alternatively, you could use params[:id] instead of params[:tag_name] in line 4 of your controller, but changing the route will make it clearer that you''re not expecting a numeric id there. -JD Harrington --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks JD. I actually do have this, but I don''t call the controller map.connect '':controller/tagged/:tag_name'', :action => :tagged Also, this could cause a lot of issue - I''m using RC1 for 1.2 and everything is restful. So in trying to go for semantic urls, is http://tld.com/elements/tagged/tag_name not a good way to go? Here is the full routes file with all comments removed: ActionController::Routing::Routes.draw do |map| map.resources :element_types map.resources :elements map.connect '':controller/tagged/:tag_name'', :action => :tagged map.connect '''', :controller => "element" map.connect '':controller/service.wsdl'', :action => ''wsdl'' map.connect '':controller/:action/:id.:format'' map.connect '':controller/:action/:id'' end I appreciate the help, John --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
AH! using the symbol for :tagged in the routes breaks it. Not sure why. But it does. Changing the route to map.connect '':controller/tagged/:tag_name'', :action => ''tagged'' made it work --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 27, 2006, at 12:45 PM, boboroshi wrote:> > AH! using the symbol for :tagged in the routes breaks it. Not sure > why. > But it does. Changing the route to > > map.connect '':controller/tagged/:tag_name'', :action => ''tagged'' > > made it work >Interesting. Glad it''s working for you now. -JD --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---