Hi, I am using the ''acts_as_taggable'' gem and have issues when I try to ''tag'' an entity with a ''tagname'' already defined. i.e 1) book[1].tag(''science'',''paperback'') --> works fine 2) book[2].tag(''roman'',''physics'',''paperback'') --> creates an exception for "paperback" as this tag is already existing in the ''tags'' db. Did anybody faced such issue? I thought this a normal scenario...so not sure whether I am using it in a wrong way. Any ideas? Thanks, Hari -- Posted via http://www.ruby-forum.com/.
Jon Gretar Borgthorsson
2006-Jun-16 16:07 UTC
[Rails] duplicate entry issue in acts_as_taggable gem
try: book[1].tag_with("science paperback) book[2].tag_with("roman physics paperback") Otherwise you are not using the tagging engine to tag but just the old school has_many. On 6/16/06, Nara Hari <nhariraj@yahoo.com> wrote:> Hi, > > I am using the ''acts_as_taggable'' gem and have issues when I try to > ''tag'' an entity with a ''tagname'' already defined. > > i.e > > 1) book[1].tag(''science'',''paperback'') --> works fine > 2) book[2].tag(''roman'',''physics'',''paperback'') --> creates an exception > for "paperback" as this tag is already existing in the ''tags'' db. > > Did anybody faced such issue? > > I thought this a normal scenario...so not sure whether I am using it in > a wrong way. > > Any ideas? > > Thanks, Hari > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
Hi J?n, I am using the ''gem'' version of acts_as_taggable and there is no "tag_with" option. Does the following work with the module version? _Hari J?n Borg??rsson wrote:> try: > book[1].tag_with("science paperback) > book[2].tag_with("roman physics paperback") > > Otherwise you are not using the tagging engine to tag but just the old > school has_many. > > On 6/16/06, Nara Hari <nhariraj@yahoo.com> wrote: >> >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > ---- Posted via http://www.ruby-forum.com/.
I have tried with the "plugin" version and it doesn''t have this problem. No idea what the issue with the gem! _Hari Nara Hari wrote:> Hi J?n, > > I am using the ''gem'' version of acts_as_taggable and there is no > "tag_with" option. > > Does the following work with the module version? > > _Hari > > J?n Borg??rsson wrote: >> try: >> book[1].tag_with("science paperback) >> book[2].tag_with("roman physics paperback") >> >> Otherwise you are not using the tagging engine to tag but just the old >> school has_many. >> >> On 6/16/06, Nara Hari <nhariraj@yahoo.com> wrote: >>> >>> Posted via http://www.ruby-forum.com/. >>> _______________________________________________ >>> Rails mailing list >>> Rails@lists.rubyonrails.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >> >> ---- Posted via http://www.ruby-forum.com/.
Jon Gretar Borgthorsson
2006-Jun-17 10:15 UTC
[Rails] Re: duplicate entry issue in acts_as_taggable gem
In almost all cases. If you have a choice between a gem or a plugin. Choose the plugin. On 6/17/06, Nara Hari <nhariraj@yahoo.com> wrote:> I have tried with the "plugin" version and it doesn''t have this problem. > > No idea what the issue with the gem! > > _Hari > > Nara Hari wrote: > > Hi J?n, > > > > I am using the ''gem'' version of acts_as_taggable and there is no > > "tag_with" option. > > > > Does the following work with the module version? > > > > _Hari > > > > J?n Borg??rsson wrote: > >> try: > >> book[1].tag_with("science paperback) > >> book[2].tag_with("roman physics paperback") > >> > >> Otherwise you are not using the tagging engine to tag but just the old > >> school has_many. > >> > >> On 6/16/06, Nara Hari <nhariraj@yahoo.com> wrote: > >>> > >>> Posted via http://www.ruby-forum.com/. > >>> _______________________________________________ > >>> Rails mailing list > >>> Rails@lists.rubyonrails.org > >>> http://lists.rubyonrails.org/mailman/listinfo/rails > >>> > >> > >> > >> -- > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/