screenconcept/kuhsaft

View on GitHub
app/models/kuhsaft/anchor_brick.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Kuhsaft
  class AnchorBrick < Brick
    validates :caption, presence: true

    def user_can_add_childs?
      false
    end

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

    def to_id
      "anchor-#{caption.parameterize}"
    end
  end
end