Class: StandardFormBuilder

Inherits:
AbstractFormBuilder show all
Defined in:
lib/sinatra_more/markup_plugin/form_builder/standard_form_builder.rb

Instance Attribute Summary

Attributes inherited from AbstractFormBuilder

#object, #template

Instance Method Summary collapse

Methods inherited from AbstractFormBuilder

#check_box, #error_messages, #file_field, #hidden_field, #image_submit, #initialize, #label, #password_field, #radio_button, #select, #submit, #text_area, #text_field

Constructor Details

This class inherits a constructor from AbstractFormBuilder

Instance Method Details

#image_submit_block(source, options = {}) ⇒ Object

image_submit_block(“submit.png”)


27
28
29
30
# File 'lib/sinatra_more/markup_plugin/form_builder/standard_form_builder.rb', line 27

def image_submit_block(source, options={})
  submit_html = self.image_submit(source, options)
  @template.(:p, submit_html)
end

#submit_block(caption, options = {}) ⇒ Object

submit_block(“Update”)


21
22
23
24
# File 'lib/sinatra_more/markup_plugin/form_builder/standard_form_builder.rb', line 21

def submit_block(caption, options={})
  submit_html = self.submit(caption, options)
  @template.(:p, submit_html)
end