about summary refs log tree commit diff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-07-12 03:24:04 +0200
committerGitHub <noreply@github.com>2017-07-12 03:24:04 +0200
commit056b5ed72f6d980bceeb49eb249b8365fe8fce66 (patch)
treebc03ef1ff45d3e9fcd275d6ab5717e182a1cf15e /app/controllers/admin
parent1764c32b9e295157b1900b9c66d3cdd76e2d3e0d (diff)
Improve UI of admin site settings (#4163)
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/settings_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb
index 29b590d7a..5985d6282 100644
--- a/app/controllers/admin/settings_controller.rb
+++ b/app/controllers/admin/settings_controller.rb
@@ -22,7 +22,7 @@ module Admin
     ).freeze
 
     def edit
-      @settings = Setting.all_as_records
+      @admin_settings = Form::AdminSettings.new
     end
 
     def update
@@ -38,12 +38,12 @@ module Admin
     private
 
     def settings_params
-      params.permit(ADMIN_SETTINGS)
+      params.require(:form_admin_settings).permit(ADMIN_SETTINGS)
     end
 
     def value_for_update(key, value)
       if BOOLEAN_SETTINGS.include?(key)
-        value == 'true'
+        value == '1'
       else
         value
       end