Class: GovukContentModels::ActionProcessors::ReceiveFactCheckProcessor

Inherits:
BaseProcessor
  • Object
show all
Defined in:
lib/govuk_content_models/action_processors/receive_fact_check_processor.rb

Instance Attribute Summary

Attributes inherited from BaseProcessor

#action_attributes, #actor, #edition, #event_attributes

Instance Method Summary collapse

Methods inherited from BaseProcessor

#initialize, #processed_edition

Constructor Details

This class inherits a constructor from GovukContentModels::ActionProcessors::BaseProcessor

Instance Method Details

#processObject

Always records the action.



6
7
8
9
10
11
# File 'lib/govuk_content_models/action_processors/receive_fact_check_processor.rb', line 6

def process
  edition.perform_event_without_validations(:receive_fact_check)
  # Fact checks are processed async, so the user doesn't get an opportunity
  # to retry without the content that (inadvertantly) fails validation, which happens frequently.
  record_action_without_validation
end

#record_action?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/govuk_content_models/action_processors/receive_fact_check_processor.rb', line 13

def record_action?
  false
end