Sha256: 4ed08e338040e8b6f1ed27a16d5950de4ac4fe05483c12d5a6fa4a9bff9d4ea0

Contents?: true

Size: 619 Bytes

Versions: 13

Compression:

Stored size: 619 Bytes

Contents

module CurationConcerns
  # Behavior to allow any controller to be displayed within
  # the administrative dashboard
  #
  # Example useage:
  #
  #    module CurationConcerns
  #      class Admin::MyController < ApplicationController
  #        include CurationConcerns::ActAsAdminController
  #
  #        # do my stuff ...
  #      end
  #    end
  #
  module ActAsAdminController
    extend ActiveSupport::Concern
    included do
      before_action :load_configuration
      layout 'admin'
    end
    def load_configuration
      @configuration = CurationConcerns::AdminController.configuration
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.7 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-2.0.0 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-2.0.0.rc2 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.6 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.5 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.4 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.3 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.2 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-2.0.0.rc1 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.1 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.0 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb
curation_concerns-1.7.0.beta1 app/controllers/concerns/curation_concerns/act_as_admin_controller.rb