Class: Uchi::Field::Base::Edit
- Defined in:
- app/components/uchi/field/base.rb
Overview
Uchi::Field::Base::Edit components render fields in the edit view.
Direct Known Subclasses
Uchi::Field::BelongsTo::Edit, Uchi::Field::Blank::Edit, Uchi::Field::Boolean::Edit, Date::Edit, DateTime::Edit, File::Edit, HasAndBelongsToMany::Edit, HasMany::Edit, Image::Edit, Number::Edit, Select::Edit, String::Edit, Text::Edit
Instance Attribute Summary collapse
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#hint ⇒ Object
readonly
Returns the value of attribute hint.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Attributes inherited from Component
Instance Method Summary collapse
-
#initialize(field:, form:, repository:, label: nil, hint: nil) ⇒ Edit
constructor
A new instance of Edit.
Methods inherited from Component
Constructor Details
#initialize(field:, form:, repository:, label: nil, hint: nil) ⇒ Edit
Returns a new instance of Edit.
30 31 32 33 34 35 |
# File 'app/components/uchi/field/base.rb', line 30 def initialize(field:, form:, repository:, label: nil, hint: nil) super(field:, record: form.object, repository:) @form = form @label = label @hint = hint end |
Instance Attribute Details
#form ⇒ Object (readonly)
Returns the value of attribute form.
28 29 30 |
# File 'app/components/uchi/field/base.rb', line 28 def form @form end |
#hint ⇒ Object (readonly)
Returns the value of attribute hint.
28 29 30 |
# File 'app/components/uchi/field/base.rb', line 28 def hint @hint end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
28 29 30 |
# File 'app/components/uchi/field/base.rb', line 28 def label @label end |