Class: ParsleySimpleForm::FormBuilder

Inherits:
SimpleForm::FormBuilder
  • Object
show all
Defined in:
lib/parsley_simple_form/form_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attribute_nameObject (readonly)

Returns the value of attribute attribute_name.



5
6
7
# File 'lib/parsley_simple_form/form_builder.rb', line 5

def attribute_name
  @attribute_name
end

Instance Method Details

#find_input(*args) ⇒ Object



16
17
18
# File 'lib/parsley_simple_form/form_builder.rb', line 16

def find_input(*args)
  super(*args)
end

#input(attribute_name, options = {}, &block) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/parsley_simple_form/form_builder.rb', line 7

def input(attribute_name, options = {}, &block)
  @attribute_name = attribute_name
  @options = options
  @block = block
  @options[:input_html] ||= {} 
  @options[:input_html].merge! parsley_html
  super(@attribute_name, @options, &@block)
end