On 09 Jul 2010, at 17:02, Pål Bergström wrote:
Why are you overcomplicating things so much?
Good question. :-) It's so much easier when you have a "programmers"
brain. I don't.
Thanks for your suggestion. But how do I get the value of a cookie in
the model?
You pass it as a parameter to the model method, just like I passed it
into a custom class.
class FooBar < ActiveRecord::Base
def some_method(cookievalue)
# do something here
end
end
# In the controller
FooBar.some_method(cookies[:myvalue])
Best regards
Peter De Berdt
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.