Class: Daisy::DataInput::RatingComponent::RatingItemComponent
- Inherits:
-
LocoMotion::BasicComponent
- Object
- LocoMotion::BaseComponent
- LocoMotion::BasicComponent
- Daisy::DataInput::RatingComponent::RatingItemComponent
- Defined in:
- app/components/daisy/data_input/rating_component.rb
Overview
Inner component for rendering individual rating items as radio inputs.
Instance Method Summary collapse
-
#before_render ⇒ Object
Sets up the component before rendering.
-
#call ⇒ String
Renders the component with the appropriate attributes.
Methods inherited from LocoMotion::BasicComponent
Instance Method Details
#before_render ⇒ Object
Sets up the component before rendering.
40 41 42 43 |
# File 'app/components/daisy/data_input/rating_component.rb', line 40 def before_render set_tag_name(:component, :input) add_html(:component, { name: loco_parent.name, type: "radio" }) end |
#call ⇒ String
Renders the component with the appropriate attributes. Takes the name from the parent component and sets the type to radio.
51 52 53 |
# File 'app/components/daisy/data_input/rating_component.rb', line 51 def call part(:component) end |