Class: MetadataPresenter::BaseUploadValidator
- Inherits:
-
BaseValidator
- Object
- BaseValidator
- MetadataPresenter::BaseUploadValidator
- Defined in:
- app/validators/metadata_presenter/base_upload_validator.rb
Direct Known Subclasses
AcceptValidator, MaxSizeValidator, MultiuploadValidator, VirusScanValidator
Instance Attribute Summary
Attributes inherited from BaseValidator
Instance Method Summary collapse
Methods inherited from BaseValidator
#allow_blank?, #custom_error_message, #default_error_message, #error_key, #initialize, #schema_key, #valid?, #validation_value
Constructor Details
This class inherits a constructor from MetadataPresenter::BaseValidator
Instance Method Details
#error_message_hash ⇒ Object
13 14 15 |
# File 'app/validators/metadata_presenter/base_upload_validator.rb', line 13 def super.merge(control:) end |
#invalid_answer? ⇒ Boolean
3 4 5 |
# File 'app/validators/metadata_presenter/base_upload_validator.rb', line 3 def invalid_answer? user_answer.error_name == error_name end |
#user_answer ⇒ Object
7 8 9 10 11 |
# File 'app/validators/metadata_presenter/base_upload_validator.rb', line 7 def user_answer page_answers.uploaded_files.find do |uploaded_file| component.id == uploaded_file.component.id end end |