I have a method inside a controller that has many lines of code (some of
them used to generate/read cookies).
In order to keep the code readable and use the object-oriented power of
Ruby, I created a foreign class that I call in my method using:
f = Foreign.new
@out = f.foreign_method
The problem is, when the foreign_method tries to create a cookies with
cookies[:c] = ‘id’
it says "undefined local variable or method ‘cookies’
So… it’s not possible to handle cookies in foreign classes. Or it’s
not even supposed to use foreign classes in Ruby?
Thanks a lot.