Sha256: 0d90eba7a573c2156d1b31aa49791d01e5f5bf906854370b48b9b92e1c08eccd

Contents?: true

Size: 388 Bytes

Versions: 6

Compression:

Stored size: 388 Bytes

Contents

module Hippo

    class Asset < Hippo::Model
        belongs_to_tenant

        include Hippo::Concerns::AssetUploader[:file]

        belongs_to :owner, polymorphic: true

        def present?
            super && file.present?
        end

        def path(size)
            Hippo.config.api_path + Hippo.config.assets_path_prefix + '/' + file_data[size]['id']
        end
    end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hippo-fw-0.9.7 lib/hippo/asset.rb
hippo-fw-0.9.6 lib/hippo/asset.rb
hippo-fw-0.9.5 lib/hippo/asset.rb
hippo-fw-0.9.4 lib/hippo/asset.rb
hippo-fw-0.9.3 lib/hippo/asset.rb
hippo-fw-0.9.2 lib/hippo/asset.rb