diff options
author | KY <tkbky@users.noreply.github.com> | 2017-10-14 20:40:10 +0800 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-14 14:40:10 +0200 |
commit | 1bdd694a0a62c4dce608c5bd43d3015c072d8524 (patch) | |
tree | 3210044de6ed3d6db08b466a81587d90074a61cb /app/controllers/admin | |
parent | 2eab41cd1a38fd382a735f32c6ecba7ec193f6f2 (diff) |
Fix #5351 - Redirection with page params after copy emoji (#5387)
* Fix #5351 - Redirection with page params after copy emoji * Add page params to copy emoji link
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/custom_emojis_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/admin/custom_emojis_controller.rb b/app/controllers/admin/custom_emojis_controller.rb index ca81f3255..5cce5bce4 100644 --- a/app/controllers/admin/custom_emojis_controller.rb +++ b/app/controllers/admin/custom_emojis_controller.rb @@ -31,10 +31,12 @@ module Admin emoji = CustomEmoji.new(domain: nil, shortcode: @custom_emoji.shortcode, image: @custom_emoji.image) if emoji.save - redirect_to admin_custom_emojis_path, notice: I18n.t('admin.custom_emojis.copied_msg') + flash[:notice] = I18n.t('admin.custom_emojis.copied_msg') else - redirect_to admin_custom_emojis_path, alert: I18n.t('admin.custom_emojis.copy_failed_msg') + flash[:alert] = I18n.t('admin.custom_emojis.copy_failed_msg') end + + redirect_to admin_custom_emojis_path(params[:page]) end def enable |