On Mon, Jan 23, 2012 at 5:13 AM, sachin kewale <[email protected]> wrote:
,
>> >> > i have one issue after entering username and password on login
>> >> > popup
>> >> > and
>> >> > clicking login button the user is logged in but i have to refresh the
>> >> > url
> i debug the code(method) but method giving the right values.My problem is
> that as i said when user logs in
> it is done in that method but i have to refresh the url to take the user
> on to new page if it valid user.
Just as an aside; this
session['user'] = myapp_user
is almost certainly a bad idea; better to just store the user_id and
fetch the user details as necessary. And this
cookies[:user_password] = { :value => user_typed, :expires =>
Time.now + 20160}
is a terrible idea, security-wise. Don't do that.
( read: http://guides.rubyonrails.org/security.html#session-storage )
To your problem -- are you using cookie-based sessions? If so, try
using ActiveRecord (or memcache) session storage.
HTH,
--
Hassan Schroeder ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.