app/controllers/app_settings_controller.rb
# Updates the application's settings based off selections made on "index" view. 
Updates the application's settings based off selections made on "index" view.
Updates the application ' s settings based off selections made on " index " view .
def update_settings
    AppSetting.all.each do |app_setting|
      unless AppSetting.save_setting(app_setting, params[:app_setting][app_setting.code])
        flash[:error] = "One or more of your fields is invalid!"
        render :index
        return
      end
    end
    flash[:notice] = t(:settings) + t(:updated)
    redirect_to app_settings_path 
  end
def update_settings AppSetting . all . each do | app_setting | unless AppSetting . save_setting ( app_setting , params [ :app_setting ] [ app_setting . code ] ) flash [ :error ] = "One or more of your fields is invalid!" render :index return end end flash [ :notice ] = t ( :settings ) + t ( :updated ) redirect_to app_settings_path end
Updates the application's settings based off selections made on "index" view.
Updates the application ' s settings based off selections made on " index " view .