Module: ModalHelper
- Defined in:
- lib/modal_helper.rb
Instance Method Summary collapse
Instance Method Details
#modal_body ⇒ Object
21 22 23 24 25 |
# File 'lib/modal_helper.rb', line 21 def modal_body content_tag("div", class: "modal-body") do yield end end |
#modal_header ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/modal_helper.rb', line 13 def modal_header content_tag(:div, class: "modal-header") do concat(content_tag("button", "×".html_safe, class: "close", "data-dismiss" => "modal", "aria-hidden" => "false") do yield end) end end |
#modal_tag(options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/modal_helper.rb', line 3 def modal_tag( = {}) content_tag :div, class: "modal", tabIndex: "-1", role: "dialog", "aria-hidden": true do concat(content_tag(:div, class: "modal-dialog") do concat(content_tag(:div, class: "modal-content") do yield end) end) end end |