Sha256: 8e7a871e78485e69af4aadd1a3eb1b480c3eaff20b9a13e730c121accb494363

Contents?: true

Size: 543 Bytes

Versions: 11

Compression:

Stored size: 543 Bytes

Contents

class ::Admin::SettingsController < ::Admin::BaseController
  authorize_resource class: Settings

  defaults resource_class: Settings

  def update
    Settings.instance.save(params[:settings])
    Settings.reload_checker.expire
    redirect_to :back
  end

  def cache_clear
    Rails.cache.clear
    render nothing: true
  end

  private

  def action_items
    []
  end

  def collection
    @settings ||= Settings.instance.editable
  end

  def collection_path
    admin_settings_path
  end

  def resource
    Settings.instance
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ab_admin-0.6.1 app/controllers/admin/settings_controller.rb
ab_admin-0.6.0 app/controllers/admin/settings_controller.rb
ab_admin-0.5.0 app/controllers/admin/settings_controller.rb
ab_admin-0.4.0 app/controllers/admin/settings_controller.rb
ab_admin-0.3.6 app/controllers/admin/settings_controller.rb
ab_admin-0.3.5 app/controllers/admin/settings_controller.rb
ab_admin-0.3.4 app/controllers/admin/settings_controller.rb
ab_admin-0.3.3 app/controllers/admin/settings_controller.rb
ab_admin-0.3.2 app/controllers/admin/settings_controller.rb
ab_admin-0.3.1 app/controllers/admin/settings_controller.rb
ab_admin-0.3.0 app/controllers/admin/settings_controller.rb