Sha256: 0d1e0465e95489e97575a03a1e79f5f332c05035dd9a5141dc90fd10df8eb9aa

Contents?: true

Size: 522 Bytes

Versions: 19

Compression:

Stored size: 522 Bytes

Contents

module Kuhsaft
  class AssetBrick < Brick
    attr_accessible :caption, :link_style, :asset

    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

19 entries across 19 versions & 1 rubygems

Version Path
kuhsaft-1.8.6 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.8.5 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.0.2 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.8.4 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.8.1 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.0.1 app/models/kuhsaft/asset_brick.rb
kuhsaft-2.0.0 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.8.0 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.7.1 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.7.0 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.6.0 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.5.0 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.4.3 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.4.2 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.4.1 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.4.0 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.3.1 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.2.15 app/models/kuhsaft/asset_brick.rb
kuhsaft-1.2.14 app/models/kuhsaft/asset_brick.rb