Class: Components::PasswordInputRow

Inherits:
InputRow
  • Object
show all
Defined in:
app/components/password_input_row.rb

Instance Method Summary collapse

Constructor Details

#initialize(form:, attribute:, label:, help: nil, options: {}) ⇒ PasswordInputRow

Returns a new instance of PasswordInputRow.



2
3
4
5
# File 'app/components/password_input_row.rb', line 2

def initialize(form:, attribute:, label:, help: nil, options: {})
  @field_options = {class: "form-control"}.merge(options)
  super
end

Instance Method Details

#input_group ⇒ Object



7
8
9
10
11
# File 'app/components/password_input_row.rb', line 7

def input_group
  div class: "input-group" do
    raw @form.password_field(@attribute, @field_options) # rubocop:disable Rails/OutputSafety
  end
end