Flowdock
tag(name, options = nil, open = false) public

Returns an empty HTML tag of type name which by default is XHTML compliant. Setting open to true will create an open tag compatible with HTML 4.0 and below. Add <a href="/rails/HTML">HTML</a> attributes by passing an attributes hash to options. For attributes with no value like (disabled and readonly), give it a value of true in the options hash. You can use symbols or strings for the attribute names.

  tag("br")
   # => <br />
  tag("br", nil, true)
   # => <br>
  tag("input", { :type => 'text', :disabled => true })
   # => <input type="text" disabled="disabled" />
Show source
Register or log in to add new notes.
April 19, 2012 - (v3.1.0 - v3.2.1)
0 thanks

Missed close tag

At the page http://apidock.com/rails/ActionView/Helpers/TagHelper/tag

<tt>.data()</tt> should be instead of <tt>.data()<tt>