Class: ActiveAdmin::ResourceController::Decorators::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/active_admin/resource_controller/decorators.rb

Class Method Summary collapse

Class Method Details

.wrap(decorator) ⇒ Object


54
55
56
57
58
59
60
61
62
63
# File 'lib/active_admin/resource_controller/decorators.rb', line 54

def self.wrap(decorator)
  collection_decorator = find_collection_decorator(decorator)

  if draper_collection_decorator? collection_decorator
    name = "#{collection_decorator.name} of #{decorator} + ActiveAdmin"
    @cache[name] ||= wrap! collection_decorator, name
  else
    collection_decorator
  end
end