title: Augmenting a model from an external gem
body: <p>I'm using <a href="http://refinerycms.com/" rel="noreferrer">refinerycms</a> in our site to let the less technical staff update content. Inside the gem, they have a Page class that maps each top level page on the site. I'd like to use the acts_as_taggable gem on this Page class. Now I can add the acts_as_taggle declaration directly to the page.rb file, but then I'd have to maintain a separate git repo to track differences between my version and the official release. </p>
  
  <p>Based on some other questions here on SO I created an initializer and extension like so:</p>
  
  <p>lib/page_extensions.rb: </p>
  
  <pre><code>module Pants
    module Extensions
  
      module Page
        module ClassMethods
          def add_taggable
            acts_as_taggable
          end
        end
  
        def self.included(base)
          base.extend(ClassMethods).add_taggable
        end
  
      end
  
    end
  end
  </code></pre>
  
  <p>config/initializers/pants.rb</p>
  
  <pre><code>require 'page_extensions'
  
  Page.send :include, Pants::Extensions::Page
  </code></pre>
  
  <p>app/views/layouts/application.html.erb</p>
  
  <pre><code>...
  Tags: &lt;%= @page.tag_list %&gt;
  </code></pre>
  
  <p>The first time I request a page from the server it correctly outputs all the tags on the page. However, if I hit refresh I instead get a <code>NoMethodError</code> indicating that tag_list is undefined. </p>
  
  <p>I'm new to rails so perhaps my assumptions are wrong, but I expected that call to Page.send would make a permanent change to the Page class rather than to a specific instance of the class. So how would I get the acts_as_taggable added to the Page class on each request?</p>