Class: Uchi::Field::Base::Edit
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- 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, String::Edit, Text::Edit
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#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.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(field:, form:, repository:, label: nil, hint: nil) ⇒ Edit
constructor
A new instance of Edit.
Constructor Details
#initialize(field:, form:, repository:, label: nil, hint: nil) ⇒ Edit
10 11 12 13 14 15 16 17 18 19 |
# File 'app/components/uchi/field/base.rb', line 10 def initialize(field:, form:, repository:, label: nil, hint: nil) super() @field = field @form = form @label = label @hint = hint @record = form.object @repository = repository end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
8 9 10 |
# File 'app/components/uchi/field/base.rb', line 8 def field @field end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
8 9 10 |
# File 'app/components/uchi/field/base.rb', line 8 def form @form end |
#hint ⇒ Object (readonly)
Returns the value of attribute hint.
8 9 10 |
# File 'app/components/uchi/field/base.rb', line 8 def hint @hint end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
8 9 10 |
# File 'app/components/uchi/field/base.rb', line 8 def label @label end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
8 9 10 |
# File 'app/components/uchi/field/base.rb', line 8 def record @record end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
8 9 10 |
# File 'app/components/uchi/field/base.rb', line 8 def repository @repository end |