Sha256: 39ac381b589b8329457a328541b838b16644306b24e8dab35a6c9107d1ea6f86

Contents?: true

Size: 385 Bytes

Versions: 62

Compression:

Stored size: 385 Bytes

Contents

module Workarea
  module AssetEndpoints
    class ProductImages < Base
      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
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.15 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.36 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.14 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.35 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.13 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.34 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.12 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.33 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.11 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.10 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.32 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.9 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.31 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.8 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.30 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.7 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.29 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.6 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.28 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.5 lib/workarea/asset_endpoints/product_images.rb