Sha256: f719e68822f3ceef6e142f66f4e66f58b99e4c00a4c7bfc2fec3379607553e04

Contents?: true

Size: 268 Bytes

Versions: 44

Compression:

Stored size: 268 Bytes

Contents

module WithDescription
  extend ActiveSupport::Concern

  included do
    markdown_on :description, :description_teaser, skip_sanitization: true
    validates_presence_of :description
  end

  def description_teaser
    description.markdown_paragraphs.first
  end
end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
mumuki-domain-7.0.2 app/models/concerns/with_description.rb
mumuki-domain-7.0.1 app/models/concerns/with_description.rb
mumuki-domain-7.0.0 app/models/concerns/with_description.rb
mumuki-domain-6.7.2 app/models/concerns/with_description.rb