diff options
author | James Lopez <james@jameslopez.es> | 2017-09-21 11:29:09 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-09-28 09:46:39 +0300 |
commit | 4a6ec7c947b8ae5360b220ec8c6c91b2221d2091 (patch) | |
tree | 6b535d71d0640118122fca3cb748407ddcd89e49 /app/controllers/oauth/applications_controller.rb | |
parent | f2e9ef102713344938e425d68d1a017403a710e0 (diff) |
refactor some controllers to make them EE friendly
Diffstat (limited to 'app/controllers/oauth/applications_controller.rb')
-rw-r--r-- | app/controllers/oauth/applications_controller.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/oauth/applications_controller.rb b/app/controllers/oauth/applications_controller.rb index 2ae4785b12c..b02e64a132b 100644 --- a/app/controllers/oauth/applications_controller.rb +++ b/app/controllers/oauth/applications_controller.rb @@ -21,14 +21,20 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController @application.owner = current_user if @application.save - flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :create]) - redirect_to oauth_application_url(@application) + redirect_to_oauth_application_page else set_index_vars render :index end end + protected + + def redirect_to_oauth_application_page + flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :create]) + redirect_to oauth_application_url(@application) + end + private def verify_user_oauth_applications_enabled |