Sha256: 3da4308a85faa46062104440ebdf94a15bf1a75fcf369cc96425d7ab0b7de8b6
Contents?: true
Size: 981 Bytes
Versions: 7
Compression:
Stored size: 981 Bytes
Contents
require "edition" class TransactionEdition < Edition field :introduction, type: String field :will_continue_on, type: String field :link, type: String field :more_information, type: String field :need_to_know, type: String field :department_analytics_profile, type: String field :alternate_methods, type: String GOVSPEAK_FIELDS = [:introduction, :more_information, :alternate_methods, :need_to_know] validates_format_of :department_analytics_profile, with: /UA-\d+-\d+/i, allow_blank: true @fields_to_clone = [:introduction, :will_continue_on, :link, :more_information, :alternate_methods, :need_to_know, :department_analytics_profile] def indexable_content "#{super} #{Govspeak::Document.new(introduction).to_text} #{Govspeak::Document.new(more_information).to_text}".strip end def whole_body [ self.link, self.introduction, self.more_information, self.alternate_methods ].join("\n\n") end end
Version data entries
7 entries across 7 versions & 1 rubygems