Commit 4b08a41c53b6a9ace6e51ef7fe008bc7aacc9b41
Exists in
master
Merge pull request #1056 from mfrederickson/controller-flash-fix
closes #1053 don't carry forward flash notices
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
app/controllers/apps_controller.rb
... | ... | @@ -53,7 +53,7 @@ class AppsController < ApplicationController |
53 | 53 | if app.save |
54 | 54 | redirect_to app_url(app), flash: { success: I18n.t('controllers.apps.flash.create.success') } |
55 | 55 | else |
56 | - flash[:error] = I18n.t('controllers.apps.flash.create.error') | |
56 | + flash.now[:error] = I18n.t('controllers.apps.flash.create.error') | |
57 | 57 | render :new |
58 | 58 | end |
59 | 59 | end |
... | ... | @@ -63,7 +63,7 @@ class AppsController < ApplicationController |
63 | 63 | if app.save |
64 | 64 | redirect_to app_url(app), flash: { success: I18n.t('controllers.apps.flash.update.success') } |
65 | 65 | else |
66 | - flash[:error] = I18n.t('controllers.apps.flash.update.error') | |
66 | + flash.now[:error] = I18n.t('controllers.apps.flash.update.error') | |
67 | 67 | render :edit |
68 | 68 | end |
69 | 69 | end |
... | ... | @@ -76,7 +76,7 @@ class AppsController < ApplicationController |
76 | 76 | if app.destroy |
77 | 77 | redirect_to apps_url, flash: { success: I18n.t('controllers.apps.flash.destroy.success') } |
78 | 78 | else |
79 | - flash[:error] = I18n.t('controllers.apps.flash.destroy.error') | |
79 | + flash.now[:error] = I18n.t('controllers.apps.flash.destroy.error') | |
80 | 80 | render :show |
81 | 81 | end |
82 | 82 | end | ... | ... |