Class: Uchi::Field::Base::Index
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Uchi::Field::Base::Index
- Defined in:
- app/components/uchi/field/base.rb
Overview
Uchi::Field::Base::Index components render fields in the index view.
Direct Known Subclasses
Uchi::Field::BelongsTo::Index, Uchi::Field::Blank::Index, Uchi::Field::Boolean::Index, Date::Index, DateTime::Index, File::Index, HasAndBelongsToMany::Index, HasMany::Index, Id::Index, Image::Index, Number::Index, String::Index, Text::Index
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Class Method Summary collapse
-
.classes_for_table_cell ⇒ Object
Returns the CSS classes to apply to the td or th of the table where this field is rendered.
Instance Method Summary collapse
-
#initialize(field:, record:, repository:) ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize(field:, record:, repository:) ⇒ Index
Returns a new instance of Index.
47 48 49 50 51 52 53 |
# File 'app/components/uchi/field/base.rb', line 47 def initialize(field:, record:, repository:) super() @field = field @record = record @repository = repository end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
37 38 39 |
# File 'app/components/uchi/field/base.rb', line 37 def field @field end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
37 38 39 |
# File 'app/components/uchi/field/base.rb', line 37 def record @record end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
37 38 39 |
# File 'app/components/uchi/field/base.rb', line 37 def repository @repository end |
Class Method Details
.classes_for_table_cell ⇒ Object
Returns the CSS classes to apply to the td or th of the table where this field is rendered.
42 43 44 |
# File 'app/components/uchi/field/base.rb', line 42 def classes_for_table_cell [] end |