I have the following code where I''m trying to set some cookies after a
successful login:
cookies[:user_id] = { :value => user.id, #this is line 27
:expires => 18.hours.from_now }
cookies[:user_role] = { :value => user.role,
:expires => 18.hours.from_now }
cookies[:user_name] = { :value => user.name,
:expires => 18.hours.from_now }
I get the following error message:
private method `gsub'' called for 1:Fixnum
...
#{RAILS_ROOT}/app/controllers/login_controller.rb:27:in `login''
This worked fine when I used session[:user_id], now that I''ve switched
it to a cookie, it''s not working.
Thanks!
--
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---