Sha256: f40e37d0a27a2fe4aae55530e0803c76bc7e74ee7bffffd1eb426da07f0cc31f

Contents?: true

Size: 495 Bytes

Versions: 7

Compression:

Stored size: 495 Bytes

Contents

module DiscoApp::Admin::Concerns::AppSettingsController

  extend ActiveSupport::Concern

  def edit
    @app_settings = DiscoApp::AppSettings.instance
  end

  def update
    @app_settings = DiscoApp::AppSettings.instance
    if @app_settings.update(app_settings_params)
      flash[:success] = 'Settings updated.'
      redirect_to edit_admin_app_settings_path
    else
      render 'edit'
    end
  end

  private

    def app_settings_params
      params.require(:app_settings)
    end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
disco_app-0.17.0 app/controllers/disco_app/admin/concerns/app_settings_controller.rb
disco_app-0.18.0 app/controllers/disco_app/admin/concerns/app_settings_controller.rb
disco_app-0.18.2 app/controllers/disco_app/admin/concerns/app_settings_controller.rb
disco_app-0.18.3 app/controllers/disco_app/admin/concerns/app_settings_controller.rb
disco_app-0.18.6 app/controllers/disco_app/admin/concerns/app_settings_controller.rb
disco_app-0.18.4 app/controllers/disco_app/admin/concerns/app_settings_controller.rb
disco_app-0.18.1 app/controllers/disco_app/admin/concerns/app_settings_controller.rb