lib/devise/routes.rb in devise-0.2.3 vs lib/devise/routes.rb in devise-0.3.0

- old
+ new

@@ -17,19 +17,19 @@ class Mapper #:doc: # Includes devise_for method for routes. This method is responsible to # generate all needed routes for devise, based on what modules you have # defined in your model. # Examples: Let's say you have an User model configured to use - # authenticable, confirmable and recoverable modules. After creating this + # authenticatable, confirmable and recoverable modules. After creating this # inside your routes: # # map.devise_for :users # # this method is going to look inside your User model and create the # needed routes: # - # # Session routes for Authenticable (default) + # # Session routes for Authenticatable (default) # new_user_session GET /users/sign_in {:controller=>"sessions", :action=>"new"} # user_session POST /users/sign_in {:controller=>"sessions", :action=>"create"} # destroy_user_session GET /users/sign_out {:controller=>"sessions", :action=>"destroy"} # # # Password routes for Recoverable, if User model has :recoverable configured @@ -67,10 +67,10 @@ resources.each do |resource| mapping = Devise::Mapping.new(resource, options) Devise.mappings[mapping.name] = mapping - if mapping.authenticable? + if mapping.authenticatable? with_options(:controller => 'sessions', :path_prefix => mapping.as) do |session| session.send(:"new_#{mapping.name}_session", mapping.path_names[:sign_in], :action => 'new', :conditions => { :method => :get }) session.send(:"#{mapping.name}_session", mapping.path_names[:sign_in], :action => 'create', :conditions => { :method => :post }) session.send(:"destroy_#{mapping.name}_session", mapping.path_names[:sign_out], :action => 'destroy', :conditions => { :method => :get }) end