locomotivecms/engine — Issue #305: (feature request) Redirect to the page I was trying to browse after loggin in
Author: kikito
Created: 2012-02-21 09:35:05+00:00
State: open

Locomotive redirects me to the admin root page every time I log in.

It would be very nice if it directed me to the page I was trying to visit before loggin in, if it existed.

I have not used devise long enough to be very helpful, but I know this involves changes in the session controller - something has to be done on this method:

def after_signin_path(resource)
admin_pages_url
end

Most people recommend doing this, but that doesn't work in Locomotive:

def after_signin_path(resource)
stored_location_for(resource) || admin_pages_url
end

This doesn't work (keeps redirecting to the admin root). I seem to be missing some key piece in the puzzle - probably setting something in the session somewhere.