7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/redmineup_controller.rb', line 7
def settings
@section = Redmineup::Settings::SECTIONS[params[:id]]
return render_404 unless @section
if request.post?
setting =
if params[:settings].present?
params[:settings].respond_to?(:to_unsafe_hash) ? params[:settings].to_unsafe_hash : params[:settings]
else
{}
end
Redmineup::Settings.apply = setting
flash[:notice] = l(:notice_successful_update)
redirect_to redmineup_settings_path(@section[:id])
else
@settings = Redmineup::Settings.values
end
@section_tabs = Redmineup::Settings::SECTIONS.map { |_n, s| { name: s[:id], partial: s[:partial], label: s[:label] } }
end
|