app/controllers/admin/settings_controller.rb in ab_admin-0.8.2 vs app/controllers/admin/settings_controller.rb in ab_admin-0.8.3
- old
+ new
@@ -2,11 +2,11 @@
authorize_resource class: Settings
defaults resource_class: Settings
def update
- Settings.instance.save(params.require(:settings).permit!.to_h)
+ Settings.update(params.require(:settings).permit!.to_h)
Settings.reload_checker.expire
redirect_back fallback_location: admin_root_url
end
def cache_clear
@@ -19,10 +19,10 @@
def action_items
[]
end
def collection
- @settings ||= Settings.instance.editable
+ @collection ||= Settings.editable_data
end
def collection_path
admin_settings_path
end
\ No newline at end of file