Kranthi
Kranthi

Reputation: 1417

Devise redirection issue

I'm using devise in my rails3 project. I need to redirect user to different page once logged-in. Without overriding sessions controller how can I do this?

Upvotes: 0

Views: 34

Answers (1)

Sjors Branderhorst
Sjors Branderhorst

Reputation: 2182

Question looks like a duplicate of https://stackoverflow.com/a/12854498/790737

Try putting this in you ApplicationController:

def after_sign_in_path_for(resource)
    different_page_path  # this should be a path helper
end

I assume you know how to use path and url helpers, and that you can use

rake routes

to list them. Good luck.

Upvotes: 1

Related Questions