Module: HelpersView::RenderTooltip
Overview
module RenderTooltip
Instance Method Summary collapse
Methods included from Common
Instance Method Details
#render_tooltip_html(tag_name, content_ele = '', content = '', options = { html: false }, &block) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/helpers_view/render_tooltip.rb', line 10 def render_tooltip_html(tag_name, content_ele = '', content = '', = { html: false }, &block) theme = [:theme] || :default version_bootstrap = [:version_bootstrap] || 5 toogle = bootstrap_version_4?(version_bootstrap) ? 'toggle' : 'bs-toggle' placement = bootstrap_version_4?(version_bootstrap) ? 'placement' : 'bs-placement' tag.send(tag_name, content_ele, data: { "#{toogle}": 'tooltip', html: [:html], 'theme': theme, "#{placement}": [:placement] }, title: content, class: [:class_name].to_s, &block) end |