Method: Bootstrap::BaseHelper#div
- Defined in:
- app/helpers/bootstrap/base_helper.rb
#div(options = {}, &block) ⇒ Object
Public: Simplify a div tag.
options - Options can be accepted by div tag. block - The content of the div tag, can be other helpers or HTML tags
or just strings.
Examples
div(class: 'hero-unit')
# => <div class="hero-unit"></div>
= div(class: 'hero-unit') do
%h1 Hello World
# => <div class="hero-unit"><h1>Hello World</h1></div>
Returns the content wrapped by a div tag.
27 28 29 30 31 |
# File 'app/helpers/bootstrap/base_helper.rb', line 27 def div( = {}, &block) content_tag('div', nil, ) do capture(&block) if block_given? end end |