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.27 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.26 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.45 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.25 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.23 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.44 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.22 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.43 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.21 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.42 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.20 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.41 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.19 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.40 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.18 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.39 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.17 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.38 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.16 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.37 lib/workarea/asset_endpoints/product_images.rb