Sha256: 8a339520c7cff790c73f983f4900dd9c1f8006126f19a2d7ea057df336e7b903
Contents?: true
Size: 669 Bytes
Versions: 31
Compression:
Stored size: 669 Bytes
Contents
# frozen_string_literal: true 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
31 entries across 31 versions & 1 rubygems