Class: TransactionEdition

Inherits:
Edition
  • Object
show all
Defined in:
app/models/transaction_edition.rb

Constant Summary collapse

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

Instance Method Summary collapse

Methods inherited from Edition

#artefact, #broadcast_action, #build_clone, #can_create_new_edition?, #check_for_archived_artefact, #clone_whole_body_from, #cloning_between_parted_types?, #destroy_artefact, #fields_to_copy, find_and_identify, find_or_create_from_panopticon_data, #first_edition_of_published, #format, #format_name, #get_next_version_number, #has_ever_been_published?, #has_sibling_in_progress?, #has_video?, #history, #in_progress_sibling, #indexable_content_with_parts, #indexable_content_without_parts, #latest_change_note, #latest_edition?, #latest_major_update, #major_updates_in_series, #meta_data, #previous_published_edition, #previous_siblings, #public_updated_at, #published_edition, #retired_format?, #safe_to_preview?, #series, #siblings, #subsequent_siblings, #update_slug_from_artefact, #was_published

Methods included from Workflow

#can_destroy?, #check_can_delete_and_notify, #denormalise_users!, #error_description, #fact_checked?, #important_note, #in_progress?, #locked_for_edits?, #mark_as_rejected, #notify_siblings_of_new_edition, #perform_event_without_validations, #previous_edition, #status_text

Instance Method Details

#indexable_contentObject



16
17
18
# File 'app/models/transaction_edition.rb', line 16

def indexable_content
  "#{super} #{Govspeak::Document.new(introduction).to_text} #{Govspeak::Document.new(more_information).to_text}".strip
end

#whole_bodyObject



20
21
22
# File 'app/models/transaction_edition.rb', line 20

def whole_body
  [ self.link, self.introduction, self.more_information, self.alternate_methods ].join("\n\n")
end