Skip to content

Commit

Permalink
Redirect to request.referer
Browse files Browse the repository at this point in the history
When update map values force redirect to same page, so as not to lose
the page we are updating.
  • Loading branch information
taitus committed Sep 9, 2019
1 parent 5d8d2ba commit c7d0226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/admin/settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def update_map
Setting["map.latitude"] = params[:latitude].to_f
Setting["map.longitude"] = params[:longitude].to_f
Setting["map.zoom"] = params[:zoom].to_i
redirect_to admin_settings_path, notice: t("admin.settings.index.map.flash.update")
redirect_to request.referer, notice: t("admin.settings.index.map.flash.update")
end

def update_content_types
Expand Down

0 comments on commit c7d0226

Please sign in to comment.