Class: ProductImage
- Defined in:
- app/models/product_image.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
Instance Method Details
#image ⇒ Object
6 7 8 9 10 11 |
# File 'app/models/product_image.rb', line 6 def image dragonfly = Dragonfly[:images] dragonfly.url_host = 'http://cdn.storesapp.com' dragonfly.url_path_prefix = '/images' dragonfly.fetch(self.image_uid) end |
#product ⇒ Object
2 3 4 |
# File 'app/models/product_image.rb', line 2 def product Product.find(:first, :from => "/v1/products/#{self.product_id}.xml") end |