class ActiveAdmin::CollectionDecorator
github.com/drapergem/draper/blob/aaa06bd2f1e219838b241a5534e7ca513edd1fe2/lib/draper/collection_decorator.rb<br>It’s implementation is heavily based on the Draper::CollectionDecorator
from Draper and thus being able to use PORO decorators as well.
methods to behave like an Array. It’s used to decouple ActiveAdmin
This class decorates a collection of objects delegating
def decorated_collection
def decorated_collection @decorated_collection ||= object.map { |item| decorator_class.new(item) } end
def initialize(object, with:)
def initialize(object, with:) @object = object @decorator_class = with end