Sha256: a2c257ce3126df5937e95a0f7dc75912e1d65180b0af590c5782c48cc65a516d
Contents?: true
Size: 855 Bytes
Versions: 15
Compression:
Stored size: 855 Bytes
Contents
class RedmineCrmController < ApplicationController layout 'admin' before_action :require_admin require_sudo_mode :settings if respond_to?(:require_sudo_mode) def settings @section = RedmineCrm::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 RedmineCrm::Settings.apply = setting flash[:notice] = l(:notice_successful_update) redirect_to redmine_crm_settings_path(@section[:id]) else @settings = RedmineCrm::Settings.values end @section_tabs = RedmineCrm::Settings::SECTIONS.map { |_n, s| { name: s[:id], partial: s[:partial], label: s[:label] } } end end
Version data entries
15 entries across 15 versions & 1 rubygems