Sha256: 06689063e9679c8fcb9df462ec16152bcf36ab54cde2fd1656f6fb9da32913ca
Contents?: true
Size: 414 Bytes
Versions: 16
Compression:
Stored size: 414 Bytes
Contents
require 'htmlentities' module Qbrick class TextBrick < Brick include ActionView::Helpers::SanitizeHelper HTML_ENTITIES = HTMLEntities.new validates :text, presence: true def user_can_add_childs? false end def collect_fulltext HTML_ENTITIES.decode( strip_tags([ text, read_more_text ].compact.join(' ')).squish ) end end end
Version data entries
16 entries across 16 versions & 1 rubygems