hello, after initial confusion which taggable plugin to use, i decided the steroids are the only option for my rails version. installed from http://svn.viney.net.nz/things/rails/pl _steroids. ran script/generate migration etc etc all according to the manuals... the aplication allows users to create interviews/questionnaires; Questions aswell as some other stuff should be tagged; but that is for later lets say only Questions have to have tags. now this is what happens:>> quest = Question.new(:q => "What is your favorite animal?")=> #<Question:0x24473b4 @attributes={"freeze"=>nil, "q"=>"What is your favorite animal?"}, @new_record=true>>> quest.save=> true>> tag = Tag.new(:name => "personal")=> #<Tag:0x2429404 @attributes={"name"=>"personal"}, @new_record=true>>> tag.save=> true>> quest.tags << tag=> [#<Tag:0x2429404 @errors=#<ActiveRecord::Errors:0x242654c @base=#<Tag:0x2429404 ...>, @errors={}>, @new_record_before_save=true, @attributes={"name"=>"personal", "id"=>2}, @new_record=false>]>> quest.save=> true>> quest.tags.size=> 1>> quest.tags.count=> 0>> quest.tag_list=> ["personal"]>> cross = Tagging.find(:all)=> [] an entry in Tags is indeed created, no entry in Taggings is created, i did have a look thru the plugin code and i am not sure which method should be responsible for the save in the cross table. what am i doing wrong? gr barbie -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Barbara Gresch wrote:> hello, > after initial confusion which taggable plugin to use, i decided the > steroids are the only option for my rails version. > installed from http://svn.viney.net.nz/things/rails/pl ... _steroids. > ran script/generate migration etc etc all according to the manuals... > the aplication allows users to create interviews/questionnaires; > Questions aswell as some other stuff should be tagged; > but that is for later lets say only Questions have to have tags. > > now this is what happens: > >> quest = Question.new(:q => "What is your favorite animal?") > => #<Question:0x24473b4 @attributes={"freeze"=>nil, "q"=>"What is your > favorite animal?"}, @new_record=true> > >> quest.save > => true > >> tag = Tag.new(:name => "personal") > => #<Tag:0x2429404 @attributes={"name"=>"personal"}, @new_record=true> > >> tag.save > => true > >> quest.tags << tag > => [#<Tag:0x2429404 @errors=#<ActiveRecord::Errors:0x242654c > @base=#<Tag:0x2429404 ...>, @errors={}>, @new_record_before_save=true, > @attributes={"name"=>"personal", "id"=>2}, @new_record=false>] > >> quest.save > => true > >> quest.tags.size > => 1 > >> quest.tags.count > => 0 > >> quest.tag_list > => ["personal"] > >> cross = Tagging.find(:all) > => [] > > an entry in Tags is indeed created, no entry in Taggings is created, i > did have a look thru the plugin code and i am not sure which method > should be responsible for the save in the cross table. > what am i doing wrong? gr barbie > -- > Posted via http://www.ruby-forum.com/.I''ve upgraded to has_many_polymorphs so my memory is a little fuzzy. But try this:>> quest = Question.new(:q => "What is your favorite animal?") >> quest.save >> quest.tag_list = "personal"--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
??? yeah i would like to use has_many_polymorphs, but doesnt work with rails 1.1.6, which is what i m stuck with. gr barbie ps: still hoping for suggestions, cos the acts_as_taggable_on_steroids is still silently not doing its job! -- 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 -~----------~----~----~----~------~----~------~--~---
thanks guys i figured it out: acts_as_taggable_on_steroids does not work with rails lower than 1.2, because below 1.2 there is no alias_method_chain thanks again gr barbie -- 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 -~----------~----~----~----~------~----~------~--~---
Hey all, I''m wondering, what is the difference between has_many_polymorphs and acts_as_taggable_on_steroids? I''m looking to implement tagging in the next few months and looking for the best solution. I had thought that was acts_as_taggable_on_steroids, what are the benefits of has_many_polymorphs? Thanks for your input. On Nov 23, 8:03 pm, Delameko <delam...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Barbara Gresch wrote: > > hello, > > after initial confusion which taggable plugin to use, i decided the > > steroids are the only option for my rails version. > > installed fromhttp://svn.viney.net.nz/things/rails/pl... _steroids. > > ran script/generate migration etc etc all according to the manuals... > > the aplication allows users to create interviews/questionnaires; > > Questions aswell as some other stuff should be tagged; > > but that is for later lets say only Questions have to have tags. > > > now this is what happens: > > >> quest = Question.new(:q => "What is your favorite animal?") > > => #<Question:0x24473b4 @attributes={"freeze"=>nil, "q"=>"What is your > > favorite animal?"}, @new_record=true> > > >> quest.save > > => true > > >> tag = Tag.new(:name => "personal") > > => #<Tag:0x2429404 @attributes={"name"=>"personal"}, @new_record=true> > > >> tag.save > > => true > > >> quest.tags << tag > > => [#<Tag:0x2429404 @errors=#<ActiveRecord::Errors:0x242654c > > @base=#<Tag:0x2429404 ...>, @errors={}>, @new_record_before_save=true, > > @attributes={"name"=>"personal", "id"=>2}, @new_record=false>] > > >> quest.save > > => true > > >> quest.tags.size > > => 1 > > >> quest.tags.count > > => 0 > > >> quest.tag_list > > => ["personal"] > > >> cross = Tagging.find(:all) > > => [] > > > an entry in Tags is indeed created, no entry in Taggings is created, i > > did have a look thru the plugin code and i am not sure which method > > should be responsible for the save in the cross table. > > what am i doing wrong? gr barbie > > -- > > Posted viahttp://www.ruby-forum.com/. > > I''ve upgraded to has_many_polymorphs so my memory is a little fuzzy. > But try this: > > >> quest = Question.new(:q => "What is your favorite animal?") > >> quest.save > >> quest.tag_list = "personal"--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---