title: How to access cookies method in a Rails 3.0 metal class
body: <p>I have a Rails 3.0 metal class that is in app/controllers directory. </p>
  
  <pre><code>class FooMetalController &lt; ActionController::Metal
  
    include ActionController::Cookies
    include ActionController::Helpers::ClassMethods
    include ActionDispatch::Session::CookieStore
  
    def hit
      unless cookies[:user_id].nil?
        logger.info("Cookies value is : #{cookies[:user_id]}")
        redirect_to "http://www.yahoo.com"
      else
        cookies[:user_id] = { :value =&gt; "198", :expires =&gt; 180.days.from_now }
        redirect_to "http://www.google.com"
      end
    end
  
  end
  </code></pre>
  
  <p>When I hit the url with: <code>http://localhost:3000/foo</code>, the <code>hit</code> method gets called. The problem is that it is not able to use the cookies method. I have included modules related to cookies, still I am getting : ActionController::RoutingError (undefined method `helper_method' for
  error message.</p>
  
  <p>How do I make a Rails metal class recognize the cookies method?</p>