Get cookie valuu into the model

How can i get the value of a cookie into the model.

(cookies[:mycookie])

In the model i get a undefined method. I understand this is not supported by Activereccord::base

But how can i get this values evan as remote_ip and other values. For my rails app i need some important values but in the model i can't get one of them.

Trying to access cookies (and other HTTP/web specific things) from the model seems like a bad idea. This would make it very difficult to use the same models from any command-line scripts, or anything that wasn't HTTP/web based. Why not have the controller pass these values down to the model, where the model can do what you wish with them?