Module: RailsBootstrapHelpers::Helpers::TagHelper

Defined in:
lib/rails-bootstrap-helpers/helpers/tag_helper.rb

Instance Method Summary collapse

Instance Method Details

#bs_content_tag(name, options = {}, &block) ⇒ Object

Returns an HTML block tag. Properly adds indentation and newlines for the returned HTML.

Example

 "div", id: "foo" do
   "div"
    append "foo"
  end

  append "bar"
end

<div id=“foo”>

<div>
  foo
</div>
bar

</div>

Parameters:

  • the (String)

    name of the tag to render

  • a (Hash)

    hash of HTML attributes



23
24
25
# File 'lib/rails-bootstrap-helpers/helpers/tag_helper.rb', line 23

def  (name, options = {}, &block)
  RailsBootstrapHelpers::Renderers::.new(self, name, options, &block).render
end