Method: PassthruValidator#validation_record_context
- Defined in:
- app/validators/passthru_validator.rb
#validation_record_context(dummy, record) ⇒ Object
69 70 71 72 73 74 75 76 77 |
# File 'app/validators/passthru_validator.rb', line 69 def validation_record_context(dummy, record) if dummy.is_a?(Decidim::Form) dummy.with_context( current_organization: record.try(:current_organization) || record.try(:ganization), current_participatory_space: record.try(:current_participatory_space) || record.try(:participatory_space), current_component: record.try(:current_component) || record.try(:component) ) end end |