Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (18 sloc) 0.513 kb
# Creates a true button element
# Place this in application_helper.rb to make it universally accessible
def button_tag(*args, &block)
if block_given?
options = args.first || {}
concat(button_tag(capture(&block), options))
else
name = args.first
options = args.second || {}
if options
options = options.stringify_keys
tag_options = tag_options(options)
else
tag_options = nil
end
"<button#{tag_options}>#{name}</button>"
end
end
Jump to Line
Something went wrong with that request. Please try again.