Devise after_sign_up_path_for - how to?

Hi,

I'm new to devise and I'm having a problem overwriting a controller.

After sign-up I want the user to go to a static page.

In the controllers folder I have created users/registrations_controller.rb

class Users::RegistrationsController < Devise::RegistrationsController

      def after_sign_up_path_for(resource)         puts "If I coould see this..."         redirect_to account_created_path       end end

I have the views for users/registrations as instructed by the documentation.

In routes I have:

devise_for :users, :controllers => { :registrations => "users/registrations" }

match "/account_created" => "info#account_created", :as => :account_created

root :to => "accounts#index"

But after sign up it always goes to root. Not to the account created page.

Any hints how to solve the problem?

Thanks.

Ok, so no overwriting needed. This is what I needed:

class ApplicationController < ActionController::Base   protect_from_forgery

  def after_sign_in_path_for(resource_or_scope)     if resource_or_scope.is_a?(User)       account_created_path     else       super     end   end

end

I have no confirmation so it signs in immediately after sign up.

Cheers.