Module: HydraEditor::Form
- Extended by:
- ActiveSupport::Autoload, 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
23
24
25
|
# File 'app/forms/hydra_editor/form.rb', line 23
def [](key)
@attributes[key.to_s]
end
|
#[]=(key, value) ⇒ Object
27
28
29
|
# File 'app/forms/hydra_editor/form.rb', line 27
def []=(key, value)
@attributes[key.to_s] = value
end
|
#initialize(model) ⇒ Object
14
15
16
17
|
# File 'app/forms/hydra_editor/form.rb', line 14
def initialize(model)
super
initialize_fields
end
|
#required?(key) ⇒ Boolean
19
20
21
|
# File 'app/forms/hydra_editor/form.rb', line 19
def required?(key)
required_fields.include?(key)
end
|