Class: TotallyTabular::HtmlHelper
- Defined in:
- lib/totally_tabular/html_helper.rb
Constant Summary collapse
- EMPTY_TAG =
/br|hr|img|meta|link|input|base|area|col|frame|param/
Instance Method Summary collapse
Instance Method Details
#content_tag(tag, content = "", attributes = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/totally_tabular/html_helper.rb', line 6 def content_tag(tag, content="", attributes={}) if tag.to_s =~ EMPTY_TAG "<%s%s>" % [tag, attrs(attributes)] else "<%s%s>%s</%s>" % [tag, attrs(attributes), content, tag] end end |