diff --git a/Gemfile b/Gemfile index dc6bdc86..c368d9b8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,9 @@ source "http://gemcutter.org" # Need to install Rails from source -gem "rails", "3.0.0.beta3" +gem "rails", :path => "../rails" gem "warden", "0.10.3" -gem "sqlite3-ruby", :require => "sqlite3" +gem "sqlite3-ruby" gem "webrat", "0.7" gem "mocha", :require => false gem "bcrypt-ruby", :require => "bcrypt" diff --git a/lib/devise/mapping.rb b/lib/devise/mapping.rb index 6e654c18..6e5cd2ff 100644 --- a/lib/devise/mapping.rb +++ b/lib/devise/mapping.rb @@ -72,6 +72,7 @@ module Devise @controllers.merge!(options.delete(:controllers) || {}) @path_names = Hash.new { |h,k| h[k] = k.to_s } + @path_names.merge!(:registration => "") @path_names.merge!(options.delete(:path_names) || {}) end diff --git a/test/rails_app/config/routes.rb b/test/rails_app/config/routes.rb index 188860f4..2afccaac 100644 --- a/test/rails_app/config/routes.rb +++ b/test/rails_app/config/routes.rb @@ -11,7 +11,8 @@ Rails::Application.routes.draw do :class_name => "User", :path_names => { :sign_in => "login", :sign_out => "logout", :password => "secret", :confirmation => "verification", - :unlock => "unblock", :sign_up => "register" + :unlock => "unblock", :sign_up => "register", + :registration => "management" } match "/admin_area/home", :to => "admins#index", :as => :admin_root diff --git a/test/routes_test.rb b/test/routes_test.rb index a8b1dbf5..533069da 100644 --- a/test/routes_test.rb +++ b/test/routes_test.rb @@ -109,6 +109,6 @@ class MapRoutingTest < ActionController::TestCase end test 'map account with custom path name for registration' do - assert_recognizes({:controller => 'devise/registrations', :action => 'new', :locale => 'en'}, '/en/accounts/register') + assert_recognizes({:controller => 'devise/registrations', :action => 'new', :locale => 'en'}, '/en/accounts/management/register') end end