Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 25th, 2012  |  syntax: Rails  |  size: 0.42 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. class ActionView::Helpers::FormBuilder
  2.   def styled_submit(value=nil, options={})
  3.     value, options = nil, value if value.is_a?(Hash)
  4.     value ||= submit_default_value
  5.  
  6.     @template.content_tag(:div,
  7.                 @template.submit_tag(value) + @template.content_tag(:span, value),
  8.                 options
  9.     )
  10.     #tag :input, {"type" => "submit", "name" => "commit", "value" => value}.update(options)
  11.   end
  12. end