Sha256: 6675287c20dc8bd774df2e7febb237344797cbd2aa68736daa0cf6e07c4dff62
Contents?: true
Size: 737 Bytes
Versions: 49
Compression:
Stored size: 737 Bytes
Contents
require "safe_html" require 'govspeak_smart_quotes_fixer' class Part include Mongoid::Document embedded_in :guide_edition embedded_in :programme_edition embedded_in :business_support_edition scope :in_order, 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] include GovspeakSmartQuotesFixer 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-z0-9\-]+$/i validates_with SafeHtml end
Version data entries
49 entries across 49 versions & 1 rubygems