Method: SuperSettings::ControllerActions#update

Defined in:
lib/super_settings/controller_actions.rb

#updateObject

API endpoint for updating settings. See SuperSettings::RestAPI for details.



42
43
44
45
46
47
48
49
50
# File 'lib/super_settings/controller_actions.rb', line 42

def update
  changed_by = SuperSettings.configuration.controller.changed_by(self)
  result = SuperSettings::RestAPI.update(params[:settings], changed_by)
  if result[:success]
    render json: result
  else
    render json: result, status: 422
  end
end