Sha256: 47d9e1597611b0e6d0c3c46c19014dcdc8160a9d21d12d436f8c63ef55c77ddf

Contents?: true

Size: 382 Bytes

Versions: 3

Compression:

Stored size: 382 Bytes

Contents

module Comable
  class Image < ActiveRecord::Base
    include Comable::Liquidable

    mount_uploader :file, Comable::ImageUploader

    belongs_to :product, class_name: Comable::Product.name

    liquid_methods :url

    delegate :url, to: :file, allow_nil: true
    delegate :current_path, to: :file, allow_nil: true
    delegate :identifier, to: :file, allow_nil: true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
comable-core-0.7.0 app/models/comable/image.rb
comable-core-0.7.0.beta2 app/models/comable/image.rb
comable-core-0.7.0.beta1 app/models/comable/image.rb