diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/settings/applications_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/settings/applications_controller.rb b/app/controllers/settings/applications_controller.rb index d3ac268d8..e6e137c2b 100644 --- a/app/controllers/settings/applications_controller.rb +++ b/app/controllers/settings/applications_controller.rb @@ -29,7 +29,13 @@ class Settings::ApplicationsController < Settings::BaseController def update if @application.update(application_params) - redirect_to settings_applications_path, notice: I18n.t('generic.changes_saved_msg') + if @application.scopes_previously_changed? + @access_token = current_user.token_for_app(@application) + @access_token.destroy + redirect_to settings_application_path(@application), notice: I18n.t('applications.token_regenerated') + else + redirect_to settings_application_path(@application), notice: I18n.t('generic.changes_saved_msg') + end else render :show end |