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.4.27 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.4 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.26 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.3 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.25 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.2 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.24 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.1 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.23 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.22 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.0 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.21 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.5.0.beta.1 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.20 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.19 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.18 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.17 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.16 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.15 lib/workarea/asset_endpoints/product_images.rb
workarea-core-3.4.14 lib/workarea/asset_endpoints/product_images.rb