Class: Banners::BannerDecorator
- Inherits:
-
Wheelhouse::Decorator
- Object
- Wheelhouse::Decorator
- Banners::BannerDecorator
- Defined in:
- app/decorators/banners/banner_decorator.rb
Instance Method Summary collapse
Instance Method Details
#as_json(options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/decorators/banners/banner_decorator.rb', line 4 def as_json(={}) result = { :label => source.label, :images => images } if source.url? result[:url] = source.url result[:target] = source.target if source.target? end result end |