Method: Formotion::Form#submit
- Defined in:
- lib/formotion/form/form.rb
#submit ⇒ Object
Triggers the #on_submit block Handles either zero or one arguments, as shown above.
137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/formotion/form/form.rb', line 137 def submit if @on_submit_callback.nil? return end if @on_submit_callback.arity == 0 @on_submit_callback.call elsif @on_submit_callback.arity == 1 @on_submit_callback.call(self) end end |