# Mislav-will\_paginate and acts\_as\_taggable\_on\_steorids problem

**URL:** <https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884>\
**Category:** Rails\
**Created:** [November 22, 2008, 12:39pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884 "2008-11-22T12:39:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [November 22, 2008, 12:39pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/1 "2008-11-22T12:39:36Z")

</div>

I always get the following problem:

Loading development environment (Rails 2.2.2) \>\> p = Frontpage.find 1

=\> #\<Frontpage id: 1, worker\_id: 1, description: “dsadsa”, show\_date:  
“2008-11-22 11:20:27”, hide\_date: “2008-12-22 11:20:27”, pos: nil,  
cached\_tag\_list: “”, active: false, created\_at: “2008-11-22 11:20:27”,  
updated\_at: “2008-11-22 11:20:27”, frontpageimage\_file\_name:  
“08\_08\_2007\_shoz.jpg”, frontpageimage\_content\_type: “image/jpeg”,  
frontpageimage\_file\_size: 203781, frontpageimage\_updated\_at:  
“2008-11-22 12:20:26”\>

> > p.tag\_list.add “1” =\> [“1”]  
> > p.save NoMethodError: undefined method  
> > `find_or_create_with_like_by_name' for #<Class:0x1ff912c> from / Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ base.rb:1833:in`method\_missing\_without\_paginate’ from /Users/bullet/  
> > Documents/RAILS\_WORK/QUAMM/quamm/vendor/plugins/will\_paginate/lib/  
> > will\_paginate/finder.rb:167:in `method_missing' from /Users/bullet/ Documents/RAILS_WORK/QUAMM/quamm/vendor/plugins/ acts_as_taggable_on_steroids/lib/acts_as_taggable.rb:182:in`save\_tags’ from /Users/bullet/Documents/RAILS\_WORK/QUAMM/quamm/vendor/  
> > plugins/acts\_as\_taggable\_on\_steroids/lib/acts\_as\_taggable.rb:181:in  
> > `each' from /Users/bullet/Documents/RAILS_WORK/QUAMM/quamm/vendor/ plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb:181:in`save\_tags’ from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/  
> > active\_record/connection\_adapters/abstract/database\_statements.rb:  
> > 66:in `transaction' from /Library/Ruby/Gems/1.8/gems/ activerecord-2.2.2/lib/active_record/transactions.rb:129:in`transaction’ from /Users/bullet/Documents/RAILS\_WORK/QUAMM/quamm/  
> > vendor/plugins/acts\_as\_taggable\_on\_steroids/lib/acts\_as\_taggable.rb:  
> > 175:in `save\_tags’

* * *

mislav-will\_paginate newest version  
acts\_as\_taggable\_on\_steorids newest version

Any solutions?  
Thanx

Jochen

---

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [November 23, 2008, 12:38am UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/2 "2008-11-23T00:38:38Z")

</div>

Jochen - I have mislav-will\_paginate-2.3.6 running under Rails-2.2.2,  
the app was migrated from Rails-2.2.0 with no changes. I can’t say  
anything about acts\_as\_taggable\_on\_steroids however.

Rick

---

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [November 23, 2008, 12:11pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/3 "2008-11-23T12:11:47Z")

</div>

On Nov 22, 11:39 am, Jochen K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I always get the following problem:
> 
> Loading development environment (Rails 2.2.2) \>\> p = Frontpage.find 1

Do you have your own class called Tag?

Fred

---

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [November 23, 2008, 12:44pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/4 "2008-11-23T12:44:38Z")

</div>

Am 23.11.2008 um 12:10 schrieb Frederick C.:

> On Nov 22, 11:39 am, Jochen K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I always get the following problem:
> > 
> > Loading development environment (Rails 2.2.2) \>\> p = Frontpage.find 1
> 
> Do you have your own class called Tag?

class Frontpage \< ActiveRecord::Base  
acts\_as\_taggable  
belongs\_to :worker  
has\_many :worker\_comments, :as =\> :worker\_commentable, :dependent  
=\> :destroy  
has\_attached\_file :frontpageimage,  
:styles =\> { :original =\> “180x255”, :thumb =\>  
“90x127” }  
end

> > f = Frontpage.find 15  
> > =\> #\<Frontpage id: 15, worker\_id: 1, matchcode: “33”, show\_date:  
> > “2008-11-23 11:08:42”, hide\_date: “2008-12-23 11:08:42”, pos: nil,  
> > cached\_tag\_list: nil, active: false, created\_at: “2008-11-23  
> > 11:08:42”, updated\_at: “2008-11-23 11:08:42”,  
> > frontpageimage\_file\_name: “11\_07\_2007\_ishot\_1.jpeg”,  
> > frontpageimage\_content\_type: “image/jpeg”, frontpageimage\_file\_size:  
> > 157393, frontpageimage\_updated\_at: “2008-11-23 12:08:41”\>  
> > f.taggings  
> > =\> []  
> > f.tag\_list = “test”  
> > =\> “test”
> > 
> > > > f.taggings  
> > > > =\> []  
> > > > f.save  
> > > > NoMethodError: undefined method `find_or_create_with_like_by_name' for #<Class:0x211d2c4> from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ base.rb:1833:in `method\_missing\_without\_paginate’  
> > > > from /Users/bullet/Documents/RAILS\_WORK/QUAMM/quamm/vendor/plugins/  
> > > > will\_paginate/lib/will\_paginate/finder.rb:167:in `method_missing' from /Users/bullet/Documents/RAILS_WORK/QUAMM/quamm/vendor/plugins/ acts_as_taggable_on_steroids/lib/acts_as_taggable.rb:182:in `save\_tags’  
> > > > from /Users/bullet/Documents/RAILS\_WORK/QUAMM/quamm/vendor/plugins/  
> > > > acts\_as\_taggable\_on\_steroids/lib/acts\_as\_taggable.rb:181:in `each' from /Users/bullet/Documents/RAILS_WORK/QUAMM/quamm/vendor/plugins/ acts_as_taggable_on_steroids/lib/acts_as_taggable.rb:181:in `save\_tags’  
> > > > from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active\_record/  
> > > > connection\_adapters/abstract/database\_statements.rb:66:in `transaction' from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ transactions.rb:129:in `transaction’  
> > > > from /Users/bullet/Documents/RAILS\_WORK/QUAMM/quamm/vendor/plugins/  
> > > > acts\_as\_taggable\_on\_steroids/lib/acts\_as\_taggable.rb:175:in `save_tags' from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/ active_support/callbacks.rb:178:in `send’  
> > > > from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/  
> > > > active\_support/callbacks.rb:178:in `evaluate_method' from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/ active_support/callbacks.rb:166:in `call’  
> > > > from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/  
> > > > active\_support/callbacks.rb:93:in `run' from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/ active_support/callbacks.rb:92:in `each’  
> > > > from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/  
> > > > active\_support/callbacks.rb:92:in `send' from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/ active_support/callbacks.rb:92:in `run’  
> > > > from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/  
> > > > active\_support/callbacks.rb:277:in `run_callbacks' ... 1 levels... from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ callbacks.rb:223:in `create\_or\_update’  
> > > > from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active\_record/  
> > > > base.rb:2383:in `save_without_validation' from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ validations.rb:1009:in `save\_without\_dirty’  
> > > > from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active\_record/  
> > > > dirty.rb:79:in `save_without_transactions' from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ transactions.rb:179:in `send’  
> > > > from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active\_record/  
> > > > transactions.rb:179:in `with_transaction_returning_status' from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/database_statements.rb:66:in `transaction’  
> > > > from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active\_record/  
> > > > transactions.rb:129:in `transaction' from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ transactions.rb:138:in `transaction’  
> > > > from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active\_record/  
> > > > transactions.rb:178:in `with_transaction_returning_status' from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ transactions.rb:146:in `save\_without\_after\_commit\_callback’  
> > > > from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active\_record/  
> > > > transactions.rb:158:in `rollback_active_record_state!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ transactions.rb:146:in `save\_without\_after\_commit\_callback’  
> > > > from /Users/bullet/Documents/RAILS\_WORK/QUAMM/quamm/vendor/plugins/  
> > > > thinking-sphinx/lib/thinking\_sphinx/active\_record/delta.rb:38:in `save’  
> > > > from (irb):177  
> > > > from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active\_record/  
> > > > attribute\_methods.rb:213\>\>

---

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [November 23, 2008, 1:25pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/5 "2008-11-23T13:25:38Z")

</div>

On 23 Nov 2008, at 11:43, Jochen K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > Loading development environment (Rails 2.2.2) \>\> p =  
> > > :styles =\> { :original =\> “180x255”, :thumb =\>  
> > > “90x127” }  
> > > end

Well done for reposting your original post but the question was  
whether you have you own Tag class (in app/models)

Fred

---

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [November 23, 2008, 2:01pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/6 "2008-11-23T14:01:58Z")

</div>

Am 23.11.2008 um 13:24 schrieb Frederick C.:

> > > 
> > 
> > acts\_as\_taggable  
> > whether you have you own Tag class (in app/models)  
> > class Tag \< ActiveRecord::Base

has\_many :worker\_comments, :as =\> :worker\_commentable

has\_many :taggings, :dependent =\> :destroy  
belongs\_to :worker

define\_index do  
indexes :name, :sortable =\> true, :unique =\> true  
set\_property :delta =\> true  
end

named\_scope :newest\_tags,  
:order =\> “created\_at DESC”,  
:group =\> “name”,  
:limit =\> 50

named\_scope :alphabetic\_taglist,  
:order =\> “name DESC”

end

---

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [November 23, 2008, 3:10pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/7 "2008-11-23T15:10:42Z")

</div>

That’s the problem. Acts as taggable on steroids defines its own Tag  
class, your tag class doesn’t have all the methods that one has.

Fred

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [April 29, 2010, 8:15pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/8 "2010-04-29T20:15:59Z")

</div>

Jochen K. wrote:

> Am 23.11.2008 um 15:09 schrieb Frederick C.:
> 
> > That’s the problem. Acts as taggable on steroids defines its own Tag  
> > class, your tag class doesn’t have all the methods that one has.
> 
> Ok, thanx! That was the problem … great!!!

Really strange. I had the same problem. I copied the contents of tag.rb  
from the plugin into my app/model/tag.rb and it solved the problem.

But it just seems like the wrong way to do it…

Any ideas?

---

<div class="post-metadata">

**Author:** ![jawosis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f04885/32.png) [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Post date:** [November 23, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884/9 "2008-11-23T16:00:00Z")

</div>

Am 23.11.2008 um 15:09 schrieb Frederick C.:

> That’s the problem. Acts as taggable on steroids defines its own Tag  
> class, your tag class doesn’t have all the methods that one has.

Ok, thanx! That was the problem … great!!!
