Class: Spina::Pro::Messages::FieldComponent
- Inherits:
-
ApplicationComponent
- Object
- ApplicationComponent
- Spina::Pro::Messages::FieldComponent
- Defined in:
- app/components/spina/pro/messages/field_component.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#form_builder ⇒ Object
readonly
Returns the value of attribute form_builder.
Instance Method Summary collapse
- #form_partial_path ⇒ Object
-
#initialize(form_builder, attribute) ⇒ FieldComponent
constructor
A new instance of FieldComponent.
Constructor Details
#initialize(form_builder, attribute) ⇒ FieldComponent
Returns a new instance of FieldComponent.
7 8 9 |
# File 'app/components/spina/pro/messages/field_component.rb', line 7 def initialize(form_builder, attribute) @form_builder, @attribute = form_builder, attribute end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
5 6 7 |
# File 'app/components/spina/pro/messages/field_component.rb', line 5 def attribute @attribute end |
#form_builder ⇒ Object (readonly)
Returns the value of attribute form_builder.
5 6 7 |
# File 'app/components/spina/pro/messages/field_component.rb', line 5 def form_builder @form_builder end |
Instance Method Details
#form_partial_path ⇒ Object
11 12 13 |
# File 'app/components/spina/pro/messages/field_component.rb', line 11 def form_partial_path "spina/admin/pro/messages/fields/#{partial}" end |