lib/labelify.rb
# Returns a submit button.  This button has style class +submit+.  If given a +type+ option +button+
# a button element will be rendered instead of input element.  This button element will contain a
# span element with the given value.
# [+value+]   the text on the button
# [+options+] HTML attributes
Returns a submit button.  This button has style class +submit+.  If given a +type+ option +button+
a button element will be rendered instead of input element.  This button element will contain a
span element with the given value.
[+value+]   the text on the button
[+options+] HTML attributes
Returns a submit button . This button has style class + submit + . If given a + type + option + button + a button element will be rendered instead of input element . This button element will contain a span element with the given value . [ + value + ] the text on the button [ + options + ] HTML attributes
def submit(value = 'Submit', options = {})
      if options[:class]
        options[:class] += ' submit'
      else
        options[:class] = 'submit'
      end
      if options[:type].to_s == 'button'
        content_tag(:button, content_tag(:span, h(value)), options.merge(:type => 'submit'))
      else
        tag(:input, {:type => 'submit', :value => t(value)}.merge(options))
      end
    end
def submit ( value = 'Submit' , options = { } ) if options [ :class ] options [ :class ] += ' submit' else options [ :class ] = 'submit' end if options [ :type ] . to_s == 'button' content_tag ( :button , content_tag ( :span , h ( value ) ) , options . merge ( :type => 'submit' ) ) else tag ( :input , { :type => 'submit' , :value => t ( value ) } . merge ( options ) ) end end
Returns a submit button.
Returns a submit button .
value
<not_specific>
options
<not_specific>