Module: Hyrax::BasicMetadataFormFieldsBehavior

Defined in:
app/forms/concerns/hyrax/basic_metadata_form_fields_behavior.rb

Class Method Summary collapse

Class Method Details

.included(descendant) ⇒ Object

Provides compatibility with the behavior of the based_near (location) controlled vocabulary form field. The form expects a ControlledVocabularies::Location object as input and produces a hash like those used with accepts_nested_attributes_for.



7
8
9
# File 'app/forms/concerns/hyrax/basic_metadata_form_fields_behavior.rb', line 7

def self.included(descendant)
  descendant.property :based_near_attributes, virtual: true, populator: :based_near_populator, prepopulator: :based_near_prepopulator
end