Sha256: efe9f4d6cce36429ae742a57a26f27f9f473b750ef90177396a6578e5a4253b3

Contents?: true

Size: 471 Bytes

Versions: 11

Compression:

Stored size: 471 Bytes

Contents

module Kuhsaft
  class AssetBrick < Brick
    mount_uploader :asset, Kuhsaft::AssetBrickAssetUploader

    validates :caption, :asset, :presence => true

    def self.styles
      %w(pdf word excel button)
    end

    def to_style_class
      [super, link_style.presence].join(' ')
    end

    def collect_fulltext
      [super, caption].join(' ')
    end

    def user_can_add_childs?
      false
    end

    def asset_present?
      asset.present?
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kuhsaft-2.2.6 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.2.5 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.2.4 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.2.3 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.2.2 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.2.1 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.2.0 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.1.2 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.1.1 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.1.0 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.0.3 app/models/kuhsaft/asset_brick.rb