How to access cookies method in a Rails 3.0 metal class -


I have a 3.0 Rail Metal Class in App / Controller Directory.

Class FooMetalController & lt; ActionController :: ActionController :: In the Metal ActionController :: Helpers :: Clasmuthions Action Dispatch :: Session :: Cookie Defrag Deff Hit Cookies [: User_ID]. Indigo? Logger.info ("Cookies value: # {cookies [: user_id}}") redirect_to "http://www.yahoo.com" Other cookies [: user_id] = {: value = & gt; "198", ends with & gt; 180.days.from_now} redirect_to "http://www.google.com" and end

When I hit the URL on it: http: // localhost: 3000 / Foo , the hit method is called The problem is that it is not able to use the cookie method. I have included a module related to cookies, yet I am getting: ActionController :: RoutingError ('undefined' method for error message 'helper_method'.

How do I identify a rail mi class how cookie method

Looking at the source:

It looks like ActionController: : Cookies collects call to helper_method when it is included. ActionController :: Cookies before ActionController :: Help .


Comments