Sha256: 8e9fec73b13318b669178b10b55d0c84fc1031695832b5ddd7dcb171fd837d33

Contents?: true

Size: 475 Bytes

Versions: 5

Compression:

Stored size: 475 Bytes

Contents

require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/attribute_accessors'

module Ecm
  module Rbac
    module Configuration
      def configure
        yield self
      end

      mattr_accessor(:user_class_name) { 'User' }

      mattr_accessor(:default_permissions_filename) { -> { Rails.root.join('config', 'permissions', 'default.yml') }  }

      def self.user_class
        user_class_name.constantize
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecm_rbac-1.2.1 lib/ecm/rbac/configuration.rb
ecm_rbac-1.2.0 lib/ecm/rbac/configuration.rb
ecm_rbac-1.0.1 lib/ecm/rbac/configuration.rb
ecm_rbac-1.0.0 lib/ecm/rbac/configuration.rb
ecm_rbac-0.0.10 lib/ecm/rbac/configuration.rb