Sha256: b57feaf7176778dfeeb928e6961321a751c89233340d17c4e9bacf5587f9b27e
Contents?: true
Size: 706 Bytes
Versions: 9
Compression:
Stored size: 706 Bytes
Contents
require "safe_html" class Part include Mongoid::Document embedded_in :guide_edition embedded_in :programme_edition embedded_in :business_support_edition scope :in_order, lambda { order_by(order: :asc) } field :order, type: Integer field :title, type: String field :body, type: String field :slug, type: String field :created_at, type: DateTime, default: lambda { Time.zone.now } GOVSPEAK_FIELDS = [:body] validates_presence_of :title validates_presence_of :slug validates_exclusion_of :slug, in: ["video"], message: "Can not be video" validates_format_of :slug, with: /\A[a-z0-9\-]+\Z/i validates_with SafeHtml validates_with LinkValidator end
Version data entries
9 entries across 9 versions & 1 rubygems