Class: CaringForm::Field::Submit
- Defined in:
- lib/caring_form/field/submit.rb
Defined Under Namespace
Classes: Renderer
Instance Attribute Summary collapse
-
#properties ⇒ Object
Returns the value of attribute properties.
Attributes inherited from Base
Instance Method Summary collapse
- #apply_to_model(klass) ⇒ Object
-
#initialize(*args) ⇒ Submit
constructor
A new instance of Submit.
- #render(form, builder, options = {}) ⇒ Object
- #simple_type ⇒ Object
Methods inherited from Base
#default_label, #input_properties, register
Constructor Details
#initialize(*args) ⇒ Submit
Returns a new instance of Submit.
64 65 66 67 |
# File 'lib/caring_form/field/submit.rb', line 64 def initialize(*args) super self.primary ||= false end |
Instance Attribute Details
#properties ⇒ Object
Returns the value of attribute properties.
62 63 64 |
# File 'lib/caring_form/field/submit.rb', line 62 def properties @properties end |
Instance Method Details
#apply_to_model(klass) ⇒ Object
69 70 71 |
# File 'lib/caring_form/field/submit.rb', line 69 def apply_to_model(klass) raise "BUG ALERT: I shouldn't be called, I'm a submit" end |
#render(form, builder, options = {}) ⇒ Object
73 74 75 76 |
# File 'lib/caring_form/field/submit.rb', line 73 def render(form, builder, = {}) = (form, ) Renderer.new(self, form, builder.template, ).render end |
#simple_type ⇒ Object
78 79 80 |
# File 'lib/caring_form/field/submit.rb', line 78 def simple_type :none end |