title: Undefined method render_to_string
body: <p>I have a gem that contains a method called get_component that is supposed to render the card called and it's specific data. I also have a call in a separate host app that makes the call to the gem method. I'm trying to make a simple integration but rails seems to think that the method doesn't exist, which is confusing because <code>ApplicationController</code> inherits from <code>ActionController::Base</code>. I've tried to manually make an object of the ActionController class. </p>
  
  <pre><code>ac = ActionController::Base.new()
  ac.render_to_string()
  </code></pre>
  
  <p>and also calling ApplicationController again:</p>
  
  <pre><code>ApplicationController.new.render_to_string
  </code></pre>
  
  <p>Which doesn't particularly make sense but was worth testing. Both times i still end up with: </p>
  
  <pre><code>undefined method `render_to_string' for Pugin::ApplicationController:Class
  </code></pre>
  
  <p>I'm a little stumped, Does it not recognise ActionController::Base in the controller or is there something fundamentally wrong with how I'm trying to call the method? </p>
  
  <p>Person File</p>
  
  <pre><code>=&gt; PUGIN.get_component('modules/card', { \
      title: defined?(person.display_name) ? link_to(person.display_name, person_path(person.id)) : "No Information", \
      house: defined?(person.houses.first.id) ? person.houses.first.id : "Lord", \
      image: [{ src: "http://wraggelabs.com/static/images/default_avatar-2.gif", \
                alt: person.display_name \
             }], \
      details: [{ description: defined?(person.constituencies.first.id) ? link_to(person.constituencies.first.name, constituencies_path(person.constituencies.first.id)) : "No Information"}, \
               { description: defined?(person.houses.first.id) ? link_to(person.houses.first.id, houses_path(person.houses.first.id)) : "No Information"}, \
               { description: defined?(person.parties.first.id) ? link_to(person.parties.first.name, houses_path(person.parties.first.id)) : "No Information"}] \
     })
  </code></pre>
  
  <p>PUGIN gem controller</p>
  
  <pre><code>module Pugin
    class ApplicationController &lt; ActionController::Base
      protect_from_forgery with: :exception
  
      def self.get_component(component_name, properties = {})
        #properties.each |property| do
          #render :partial =&gt; "layouts/pugin/#{component_name}", locals: {properties: property}
          render_to_string("layouts/pugin/_#{component_name}", :formats =&gt; [:html])
        #end
      end
  
    end
  end
  </code></pre>
  
  <p>NOTE: I'm aware that the implementation of render_to_string is probably wrong and will break at the moment. But the problem at hand is just trying to get the method to be recognised.</p>