Sha256: bb9ce6d4476589aef2b1f9316be4c4259c13d9948a210262f62120ebaa883da7
Contents?: true
Size: 639 Bytes
Versions: 24
Compression:
Stored size: 639 Bytes
Contents
module ActiveAdmin class ResourceController < BaseController module ResourceClassMethods # Override the default `resource_class` class and instance # methods to only return the class defined in the instance # of ActiveAdmin::Resource def override_resource_class_methods! class_exec do def self.resource_class=(klass); end def self.resource_class @active_admin_config ? @active_admin_config.resource_class : nil end private def resource_class self.class.resource_class end end end end end end
Version data entries
24 entries across 24 versions & 3 rubygems