Module: HydraEditor::Form
- Extended by:
- ActiveSupport::Concern
- Includes:
- Hydra::Presenter
- Defined in:
- app/forms/hydra_editor/form.rb,
app/forms/hydra_editor/form/permissions.rb
Defined Under Namespace
Modules: ClassMethods, Permissions
Classes: Validator
Instance Method Summary
collapse
#multiple?, #terms
#to_model
Instance Method Details
#[](key) ⇒ Object
21
22
23
|
# File 'app/forms/hydra_editor/form.rb', line 21
def [](key)
@attributes[key.to_s]
end
|
#[]=(key, value) ⇒ Object
25
26
27
|
# File 'app/forms/hydra_editor/form.rb', line 25
def []=(key, value)
@attributes[key.to_s] = value
end
|
#initialize(model) ⇒ Object
12
13
14
15
|
# File 'app/forms/hydra_editor/form.rb', line 12
def initialize(model)
super
initialize_fields
end
|
#required?(key) ⇒ Boolean
17
18
19
|
# File 'app/forms/hydra_editor/form.rb', line 17
def required?(key)
required_fields.include?(key)
end
|