app/controllers/admin/settings_controller.rb in ab_admin-0.6.1 vs app/controllers/admin/settings_controller.rb in ab_admin-0.7.0
- old
+ new
@@ -2,13 +2,13 @@
authorize_resource class: Settings
defaults resource_class: Settings
def update
- Settings.instance.save(params[:settings])
+ Settings.instance.save(params.require(:settings).permit!.to_h)
Settings.reload_checker.expire
- redirect_to :back
+ redirect_back fallback_location: admin_root_url
end
def cache_clear
Rails.cache.clear
render nothing: true
@@ -29,7 +29,6 @@
end
def resource
Settings.instance
end
-
end
\ No newline at end of file