Sha256: ca4c0c25ae14ae4d52aa75296bf0cf7ae4ecdf50c965f4c01dd3d1fec6d2bc33
Contents?: true
Size: 966 Bytes
Versions: 12
Compression:
Stored size: 966 Bytes
Contents
module RailsAdmin EXTENSIONS = [] # rubocop:disable MutableConstant AUTHORIZATION_ADAPTERS = {} # rubocop:disable MutableConstant AUDITING_ADAPTERS = {} # rubocop:disable MutableConstant CONFIGURATION_ADAPTERS = {} # rubocop:disable MutableConstant # Extend RailsAdmin # # The extension may define various adapters (e.g., for authorization) and # register those via the options hash. def self.add_extension(extension_key, extension_definition, options = {}) options.assert_valid_keys(:authorization, :configuration, :auditing) EXTENSIONS << extension_key if options[:authorization] AUTHORIZATION_ADAPTERS[extension_key] = extension_definition::AuthorizationAdapter end if options[:configuration] CONFIGURATION_ADAPTERS[extension_key] = extension_definition::ConfigurationAdapter end if options[:auditing] AUDITING_ADAPTERS[extension_key] = extension_definition::AuditingAdapter end end end
Version data entries
12 entries across 12 versions & 1 rubygems