15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'app/controllers/easy_settings_controller.rb', line 15
def update
if params[:settings]
Setting.send("plugin_#{@plugin.id}=", params[:settings].permit!)
end
if params[:easy_setting]
@easy_settings = EasySettings::ParamsWrapper.from_params(params[:easy_setting].permit!, project: @project, prefix: @plugin.id)
if @easy_settings.save
else
render :edit
return
end
end
flash[:notice] = l(:notice_successful_update)
redirect_back_or_default edit_easy_setting_path(@plugin.id)
end
|