1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Enable :registration in the :path_names configuration option.

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Davide Marquês 2010-05-11 16:29:00 +01:00 committed by José Valim
parent e905762611
commit 8e173f486c
2 changed files with 3 additions and 3 deletions

View file

@ -96,7 +96,7 @@ This will use your User model to create a set of needed routes (you can see them
Options for configuring your routes include :class_name (to set the class for that route), :path_prefix, :as and :path_names, where the last two have the same meaning as in common routes. The available :path_names are:
devise_for :users, :as => "usuarios", :path_names => { :sign_in => 'login', :sign_out => 'logout', :sign_up => 'register', :password => 'secret', :confirmation => 'verification', :unlock => 'unblock' }
devise_for :users, :as => "usuarios", :path_names => { :sign_in => 'login', :sign_out => 'logout', :password => 'secret', :confirmation => 'verification', :unlock => 'unblock', :registration => 'register', :sign_up => 'cmon_let_me_in' }
Be sure to check devise_for documentation for details.

View file

@ -136,9 +136,9 @@ module ActionDispatch::Routing
def devise_registration(mapping, controllers)
scope mapping.full_path[1..-1], :name_prefix => mapping.name do
resource :registration, :only => [:new, :create, :edit, :update, :destroy], :path => "",
resource :registration, :only => [:new, :create, :edit, :update, :destroy], :path => mapping.path_names[:registration],
:path_names => { :new => mapping.path_names[:sign_up] }, :controller => controllers[:registrations]
end
end
end
end
end