Class: Workarea::AssetEndpoints::ProductImages
- Defined in:
- lib/workarea/asset_endpoints/product_images.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Workarea::AssetEndpoints::Base
Instance Method Details
#result ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/workarea/asset_endpoints/product_images.rb', line 4 def result Catalog::Product .find_by(slug: params[:slug]) .images .find(params[:image_id]) .process(params[:job]) rescue Mongoid::Errors::DocumentNotFound Catalog::ProductPlaceholderImage.cached.process(params[:job]) end |