Class: Stormpath::Rails::SocialController
Instance Method Summary
collapse
Instance Method Details
#login_the_account(account) ⇒ Object
#respond_with_error(error) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/controllers/stormpath/rails/social_controller.rb', line 19
def respond_with_error(error)
respond_to do |format|
format.html do
flash.now[:error] = error.message
render stormpath_config.web.login.view
end
format.json do
render json: { status: error.status, message: error.message }, status: error.status
end
end
end
|
#respond_with_success ⇒ Object
12
13
14
15
16
17
|
# File 'app/controllers/stormpath/rails/social_controller.rb', line 12
def respond_with_success
respond_to do |format|
format.json { render nothing: true, status: :ok }
format.html { redirect_to stormpath_config.web.login.next_uri }
end
end
|