Module: ActiveDecoratorExtension
- Defined in:
- lib/active_decorator_with_decorate_associations/active_decorator_extension.rb
Instance Method Summary collapse
Instance Method Details
#decorate(obj) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/active_decorator_with_decorate_associations/active_decorator_extension.rb', line 8 def decorate(obj) return if defined?(Jbuilder) && Jbuilder === obj return if obj.nil? super obj.extend ActiveDecoratorWithDecorateAssociations::Marker if obj.is_a?(ActiveRecord::Base) obj end |