Pål Bergström wrote: >> def index >> @users = User.all >> @cookie_count = cookies.size >> @user_name_cookie = cookies[:user_name] if @cookie_count > 0 >> .... >> .... >> end > I don't want to set a cookie. That's never been a problem. I would like > to read a cookie and get the value into models so I can access it when > using a before_save.
I though I had made that clear. You read the cookie value as shown in above index method of the controller then you pass that value to the model object. If you don't know how to pass a variable to a method, then I'd suggest learning something about Ruby before you try to write a Rails application. I don't know how to make this any more clear. -- Posted via http://www.ruby-forum.com/. -- 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.