Class: BetterForm::Builder

Inherits:
ActionView::Helpers::FormBuilder
  • Object
show all
Includes:
ActionView::Helpers::UrlHelper
Defined in:
lib/better_form/builder.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) submit(options = {})



53
54
55
56
57
58
59
60
61
# File 'lib/better_form/builder.rb', line 53

def submit(options = {})
  value = options.delete(:value)
  cancel_url = options.delete(:cancel)
  if cancel_url
    super(value, options) + "<span class='cancel'>or #{link_to('Cancel', cancel_url)}</span>".html_safe
  else
    super(value, options)
  end
end