Sha256: 3e0a0f48910c2f6c5142fa7ee778d855792d783e146d37c5c550063b60cbc2a3
Contents?: true
Size: 1002 Bytes
Versions: 8
Compression:
Stored size: 1002 Bytes
Contents
module ActiveDecorator module ActionViewExtension def setup_decorator @locals.values.each do |v| ActiveDecorator::Decorator.instance.decorate v end unless @locals.blank? ActiveDecorator::Decorator.instance.decorate @object unless @object.blank? ActiveDecorator::Decorator.instance.decorate @collection unless @collection.blank? self end end end if ActionPack::VERSION::STRING >= '3.1' class ActionView::PartialRenderer include ActiveDecorator::ActionViewExtension def setup_with_decorator(context, options, block) #:nodoc: setup_without_decorator context, options, block setup_decorator end alias_method_chain :setup, :decorator end else class ActionView::Partials::PartialRenderer include ActiveDecorator::ActionViewExtension def setup_with_decorator(options, block) #:nodoc: setup_without_decorator options, block setup_decorator end alias_method_chain :setup, :decorator end end
Version data entries
8 entries across 8 versions & 1 rubygems