Hello, I use acts_as_taggable_on_steroids, for tagging and I get this error: "NoMethodError (undefined method `+'' for #<TagList:0x3546e94 @names=["kk"]>): .//app/controllers/user_photos_controller.rb:83:in `add_tag''" The code in the controller is: def add_tag @photo = @logged_in_user.photos.find(params[:id]) 83 @photo.tag_list += '','' + params[:tag][:name] @photo.save @new_tag = @photo.reload.tags.last end Please advise on what could the problem be, as until now I tried everything I knew and search the forum and net for any ideas and found nothing to help. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Use this to add your tags p.tag_list.add("Great", "Awful") On 9/17/07, Bogdan Nenu <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Hello, > I use acts_as_taggable_on_steroids, for tagging and I get this error: > > "NoMethodError (undefined method `+'' for #<TagList:0x3546e94 > @names=["kk"]>): > .//app/controllers/user_photos_controller.rb:83:in `add_tag''" > > > The code in the controller is: > > def add_tag > @photo = @logged_in_user.photos.find(params[:id]) > 83 @photo.tag_list += '','' + params[:tag][:name] > @photo.save > @new_tag = @photo.reload.tags.last > end > > > Please advise on what could the problem be, as until now I tried > everything I knew and search the forum and net for any ideas and found > nothing to help. > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ivor Paul wrote:> Use this to add your tags > > p.tag_list.add("Great", "Awful")Hello, Thank you very much, it worked swell. I''m still trying thou to understand why it didn''t worked the other way. Anyway thanks again for the help and best regards. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---