views:

246

answers:

2

Hi,

I am using Rails 2.3 and Devise to handle user registration / authentication.

I need to redirect a user to an external 3rd party website immediately after a user signs up for an account. Been looking in the code & online but cannot see how to do this.

How can I alter the devise flow to redirect the user?

Thanks!

A: 

Have you had a chance to watch the railscast on devise? http://railscasts.com/episodes/209-introducing-devise 209 and 210

Amit
Jason
Hope this helps. http://wiki.github.com/plataformatec/devise/howto-redirect-to-a-specific-page-on-successful-sign-in
Amit
+1  A: 

Add to your Application Controller

  # Devise: Where to redirect users once they have logged in
  def after_sign_in_path_for(resource)
    "http://www.google.com" # <- Path you want to redirect the user to.
  end

Here is the list of Devise helpers you can use http://rdoc.info/github/plataformatec/devise/master/Devise/Controllers/Helpers

I hope that helps =)

Carlos A. Cabrera