Class: Uchi::Field::BelongsTo::Show
- Inherits:
-
Uchi::Field::Base::Show
- Object
- ViewComponent::Base
- Uchi::Field::Base::Component
- Uchi::Field::Base::Show
- Uchi::Field::BelongsTo::Show
- Includes:
- Helpers
- Defined in:
- app/components/uchi/field/belongs_to.rb
Instance Attribute Summary
Attributes inherited from Uchi::Field::Base::Component
Instance Method Summary collapse
Methods included from Helpers
#associated_record, #associated_repository, #label_for_associated_record
Methods inherited from Uchi::Field::Base::Component
Constructor Details
This class inherits a constructor from Uchi::Field::Base::Component
Instance Method Details
#path_to_show_associated_record ⇒ Object
98 99 100 101 102 |
# File 'app/components/uchi/field/belongs_to.rb', line 98 def path_to_show_associated_record associated_repository .routes .path_for(:show, id: associated_record.id) end |
#render? ⇒ Boolean
104 105 106 |
# File 'app/components/uchi/field/belongs_to.rb', line 104 def render? associated_record.present? end |