Created
January 28, 2015 01:11
-
-
Save edison/c156c3858ea6cb39486d to your computer and use it in GitHub Desktop.
Devise Sessions Controller for Ajax
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
class Website::SessionsController < ::Devise::SessionsController | |
respond_to :js | |
layout false | |
# POST /resource/sign_in | |
def create | |
self.resource = warden.authenticate(auth_options) | |
if resource && resource.active_for_authentication? | |
sign_in(resource_name, resource) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment