22 lines
707 B
Ruby
22 lines
707 B
Ruby
class DeviseAuth::SessionsController < Devise::SessionsController
|
|
|
|
def new
|
|
resource = build_resource
|
|
clean_up_passwords(resource)
|
|
respond_with_navigational(resource, stub_options(resource)){ render :partial => "devise/sessions/new" }
|
|
end
|
|
|
|
def create
|
|
resource = warden.authenticate!(:scope => resource_name, :recall => "#{controller_path}#new")
|
|
set_flash_message(:notice, :signed_in) if is_navigational_format?
|
|
sign_in(resource_name, resource)
|
|
aysnc_redirect_to new_user_registration_path
|
|
end
|
|
|
|
def destroy
|
|
signed_in = signed_in?(resource_name)
|
|
Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
|
|
|
|
async_redirect_to charts_path
|
|
end
|
|
end |