Sha256: 7ff4973df9c9ace6ed7780cb5ebb1e0d286c54c2d3ccbed63ccc68041abdfc26

Contents?: true

Size: 180 Bytes

Versions: 7

Compression:

Stored size: 180 Bytes

Contents

module Draper::ModelSupport
  def decorator
    @decorator ||= "#{self.class.name}Decorator".constantize.decorate(self)
    block_given? ? yield(@decorator) : @decorator
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
draper-0.9.3 lib/draper/model_support.rb
draper-0.9.2 lib/draper/model_support.rb
draper-0.9.1 lib/draper/model_support.rb
draper-0.9.0 lib/draper/model_support.rb
draper-0.8.1 lib/draper/model_support.rb
draper-0.8.0 lib/draper/model_support.rb
draper-0.7.4 lib/draper/model_support.rb