Class: Spina::Pro::Messages::FieldComponent

Inherits:
ApplicationComponent
  • Object
show all
Defined in:
app/components/spina/pro/messages/field_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributeObject (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_builderObject (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_pathObject



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