Sha256: 18c77a650cffde8c4159cfdadd2eb98f9ef5d0538bd1a49534f380b7178be0df

Contents?: true

Size: 805 Bytes

Versions: 12

Compression:

Stored size: 805 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 :alternate_methods, type: String

  GOVSPEAK_FIELDS = [:introduction, :more_information, :alternate_methods, :need_to_know]

  @fields_to_clone = [:introduction, :will_continue_on, :link,
                      :more_information, :alternate_methods,
                      :need_to_know]

  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

12 entries across 12 versions & 1 rubygems

Version Path
govuk_content_models-28.8.0 app/models/transaction_edition.rb
govuk_content_models-28.7.1 app/models/transaction_edition.rb
govuk_content_models-28.7.0 app/models/transaction_edition.rb
govuk_content_models-28.6.2 app/models/transaction_edition.rb
govuk_content_models-28.6.1 app/models/transaction_edition.rb
govuk_content_models-28.6.0 app/models/transaction_edition.rb
govuk_content_models-28.5.0 app/models/transaction_edition.rb
govuk_content_models-28.4.0 app/models/transaction_edition.rb
govuk_content_models-28.3.0 app/models/transaction_edition.rb
govuk_content_models-28.2.0 app/models/transaction_edition.rb
govuk_content_models-28.1.0 app/models/transaction_edition.rb
govuk_content_models-28.0.1 app/models/transaction_edition.rb