diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb index 2d69ff19a..14dfc6658 100644 --- a/app/controllers/admin/settings_controller.rb +++ b/app/controllers/admin/settings_controller.rb @@ -15,9 +15,9 @@ class Admin::SettingsController < Admin::BaseController end def update_map - Setting["map.latitude"] = params[:latitude].to_f - Setting["map.longitude"] = params[:longitude].to_f - Setting["map.zoom"] = params[:zoom].to_i + 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") end diff --git a/app/helpers/map_locations_helper.rb b/app/helpers/map_locations_helper.rb index 1df7a861c..e0350773c 100644 --- a/app/helpers/map_locations_helper.rb +++ b/app/helpers/map_locations_helper.rb @@ -5,15 +5,15 @@ module MapLocationsHelper end def map_location_latitude(map_location) - map_location.present? && map_location.latitude.present? ? map_location.latitude : Setting["map.latitude"] + map_location.present? && map_location.latitude.present? ? map_location.latitude : Setting["map_latitude"] end def map_location_longitude(map_location) - map_location.present? && map_location.longitude.present? ? map_location.longitude : Setting["map.longitude"] + map_location.present? && map_location.longitude.present? ? map_location.longitude : Setting["map_longitude"] end def map_location_zoom(map_location) - map_location.present? && map_location.zoom.present? ? map_location.zoom : Setting["map.zoom"] + map_location.present? && map_location.zoom.present? ? map_location.zoom : Setting["map_zoom"] end def map_location_input_id(prefix, attribute) diff --git a/app/views/admin/settings/_map_form.html.erb b/app/views/admin/settings/_map_form.html.erb index beac8e87b..1f74698f1 100644 --- a/app/views/admin/settings/_map_form.html.erb +++ b/app/views/admin/settings/_map_form.html.erb @@ -2,14 +2,14 @@