Created
November 9, 2012 08:53
-
-
Save mytrile/4044557 to your computer and use it in GitHub Desktop.
Cookie based authentication strategy in Devise
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
# config/application.rb | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W(#{config.root}/lib/devise) | |
# rest of the file | |
end | |
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
# config/initializers/devise.rb | |
Devise.setup do |config| | |
config.warden do |manager| | |
manager.default_strategies(:scope => :user).unshift :token_cookie_strategy | |
end | |
# rest fo the file | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment