Class: Snazzy::ArrayInputComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/snazzy/array_input_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(object:, form:, field:, label_text:, placeholder: "Add a tag...", validations: []) ⇒ ArrayInputComponent

Returns a new instance of ArrayInputComponent.



7
8
9
10
11
12
13
14
15
# File 'app/components/snazzy/array_input_component.rb', line 7

def initialize(object:, form:, field:, label_text:, placeholder: "Add a tag...", validations: [])
  @object = object
  @model_name = object.class.name.underscore
  @form = form
  @field = field
  @label_text = label_text
  @placeholder = placeholder
  @validations = validations
end