forked from heartcombo/devise
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep modules definition in a different file.
- Loading branch information
Showing
7 changed files
with
125 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'active_support/core_ext/object/with_options' | ||
|
||
Devise.with_options :model => true do |d| | ||
# Strategies first | ||
d.with_options :strategy => true do |s| | ||
s.add_module :authenticatable, :controller => :sessions, :flash => :invalid, :route => :session | ||
s.add_module :http_authenticatable | ||
s.add_module :token_authenticatable, :controller => :sessions, :flash => :invalid_token, :route => :session | ||
s.add_module :rememberable | ||
end | ||
|
||
# Misc after | ||
d.add_module :recoverable, :controller => :passwords, :route => :password | ||
d.add_module :registerable, :controller => :registrations, :route => :registration | ||
d.add_module :validatable | ||
|
||
# The ones which can sign out after | ||
d.add_module :activatable, :flash => :inactive | ||
d.add_module :confirmable, :controller => :confirmations, :flash => :unconfirmed, :route => :confirmation | ||
d.add_module :lockable, :controller => :unlocks, :flash => :locked, :route => :unlock | ||
d.add_module :timeoutable, :flash => :timeout | ||
|
||
# Stats for last, so we make sure the user is really signed in | ||
d.add_module :trackable | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters