# Acts\_as\_taggable\_on\_steroids

**URL:** <https://www.ruby-forum.com/t/acts-as-taggable-on-steroids/121093>\
**Category:** Rails\
**Created:** [November 23, 2007, 5:12pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids/121093 "2007-11-23T17:12:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![barbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3e96dc/32.png) [@barbie](https://www.ruby-forum.com/u/barbie)\
**Post date:** [November 23, 2007, 5:12pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids/121093/1 "2007-11-23T17:12:32Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![barbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3e96dc/32.png) [@barbie](https://www.ruby-forum.com/u/barbie)\
**Post date:** [November 23, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids/121093/2 "2007-11-23T20:04:18Z")

</div>

Barbara Gresch wrote:

> > > quest = Question.new(:q =\> “What is your favorite animal?”)  
> > > @base=#\<Tag:0x2429404 …\>, @errors={}\>, @new\_record\_before\_save=true,  
> > > =\> []
> 
> ## 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/](http://www.ruby-forum.com/).

I’ve upgraded to has\_many\_polymorphs so my memory is a little fuzzy.  
But try this:

---

<div class="post-metadata">

**Author:** ![barbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3e96dc/32.png) [@barbie](https://www.ruby-forum.com/u/barbie)\
**Post date:** [November 26, 2007, 9:14am UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids/121093/3 "2007-11-26T09:14:28Z")

</div>

???  
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!

---

<div class="post-metadata">

**Author:** ![barbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3e96dc/32.png) [@barbie](https://www.ruby-forum.com/u/barbie)\
**Post date:** [November 26, 2007, 5:19pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids/121093/4 "2007-11-26T17:19:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![barbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3e96dc/32.png) [@barbie](https://www.ruby-forum.com/u/barbie)\
**Post date:** [November 26, 2007, 6:33pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids/121093/5 "2007-11-26T18:33:13Z")

</div>

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.
