Class: FormProps::Inputs::Submit

Inherits:
Base
  • Object
show all
Defined in:
lib/form_props/inputs/submit.rb

Instance Method Summary collapse

Methods inherited from Base

#json

Constructor Details

#initialize(template_object, options) ⇒ Submit

Returns a new instance of Submit.



6
7
8
9
# File 'lib/form_props/inputs/submit.rb', line 6

def initialize(template_object, options)
  @template_object = template_object
  @options = options.with_indifferent_access
end

Instance Method Details

#renderObject



11
12
13
14
15
16
17
# File 'lib/form_props/inputs/submit.rb', line 11

def render
  @options[:type] = field_type

  json.set!(:submit) do
    input_props(@options)
  end
end