Sha256: c20e64a40cddd93cd2d1a39223e71b7a5e5668e1a0bb4702683ae4496dad50e0

Contents?: true

Size: 360 Bytes

Versions: 16

Compression:

Stored size: 360 Bytes

Contents

module Qbrick
  class LinkBrick < Brick
    validates :href, :caption, presence: true

    def self.styles
      %w(pdf word excel button external)
    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
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
qbrick-2.7.1 app/models/qbrick/link_brick.rb
qbrick-2.7 app/models/qbrick/link_brick.rb
qbrick-2.6.10 app/models/qbrick/link_brick.rb
qbrick-2.6.9 app/models/qbrick/link_brick.rb
qbrick-2.6.8 app/models/qbrick/link_brick.rb
qbrick-2.6.7 app/models/qbrick/link_brick.rb
qbrick-2.6.6 app/models/qbrick/link_brick.rb
qbrick-2.6.5 app/models/qbrick/link_brick.rb
qbrick-2.6.4 app/models/qbrick/link_brick.rb
qbrick-2.6.3 app/models/qbrick/link_brick.rb
qbrick-2.6.2 app/models/qbrick/link_brick.rb
qbrick-2.6.1 app/models/qbrick/link_brick.rb
qbrick-2.6.0 app/models/qbrick/link_brick.rb
qbrick-2.5.2 app/models/qbrick/link_brick.rb
qbrick-2.5.1 app/models/qbrick/link_brick.rb
qbrick-2.5.0 app/models/qbrick/link_brick.rb