Module: Draper::ModelSupport::ClassMethods

Defined in:
lib/draper/model_support.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) decorate(options = {})



10
11
12
13
# File 'lib/draper/model_support.rb', line 10

def decorate(options = {})
  decorator_proxy = "#{model_name}Decorator".constantize.decorate(self.scoped, options)
  block_given? ? yield(decorator_proxy) : decorator_proxy
end