# Extending the Page module with acts\_as\_taggable

**URL:** <https://www.ruby-forum.com/t/extending-the-page-module-with-acts-as-taggable/64629>\
**Category:** Radiant CMS\
**Created:** [August 15, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/extending-the-page-module-with-acts-as-taggable/64629 "2006-08-15T14:11:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dror\_tirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/439d5e/32.png) [@dror\_tirosh](https://www.ruby-forum.com/u/dror_tirosh)\
**Post date:** [August 15, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/extending-the-page-module-with-acts-as-taggable/64629/1 "2006-08-15T14:11:54Z")

</div>

Hi,  
I’m trying to extend the Page module with acts\_as\_taggable, I added a  
plugin  
under the vendor part with the taggable.rb file and the following files:

page\_ex.rb:  
class Page  
acts\_as\_taggable  
end

and init.rb:  
require\_dependency ‘page’  
require ‘taggable’  
require ‘page\_ex.rb’

This works in perfectly in production, but breaks in development, in  
development the first call to an act\_as\_taggable fucntion works, but any  
call after that gives errors like this:  
NoMethodError (undefined method `tag’ for #Page:0x3878520)

I know this is a result of class caching and reloading of the class data  
(or  
at least I assume this is the reason).

Any ideas of how to solve this in devlopment?

Dror

---

<div class="post-metadata">

**Author:** ![dror\_tirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/439d5e/32.png) [@dror\_tirosh](https://www.ruby-forum.com/u/dror_tirosh)\
**Post date:** [August 15, 2006, 2:12pm UTC](https://www.ruby-forum.com/t/extending-the-page-module-with-acts-as-taggable/64629/2 "2006-08-15T14:12:06Z")

</div>

On 10/08/2006, at 1:53 PM, dror tirosh wrote:

> I know this is a result of class caching and reloading of the class  
> data (or at least I assume this is the reason).
> 
> Any ideas of how to solve this in devlopment?
> 
> Dror

I was running into this same problem all the time, I just gave up and  
put a local version of radiant in my subversion repository, so I could  
patch it easily. I remember reading somewhere (I just had a quick look,  
but I cant find the reference ☹ ) that rails plugins are designed to  
be used by the application developer, not for patching an application  
developed by someone else.

Bodhi

---

<div class="post-metadata">

**Author:** ![dror\_tirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/439d5e/32.png) [@dror\_tirosh](https://www.ruby-forum.com/u/dror_tirosh)\
**Post date:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/extending-the-page-module-with-acts-as-taggable/64629/3 "2006-08-15T14:17:28Z")

</div>

dror tirosh wrote:

> This works in perfectly in production, but breaks in development, in  
> development the first call to an act\_as\_taggable fucntion works, but any  
> call after that gives errors like this:  
> NoMethodError (undefined method `tag’ for #Page:0x3878520)

I will look at trying to fix this when we implement the real plugin  
system. For now I’d recommend that you only run in production mode.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)
