Module: Bh::Helpers::Tooltips
- Included in:
- Bh::Helpers
- Defined in:
- lib/bh/helpers/tooltips.rb
Overview
The words an element says on hover, which Bootstrap wires nowhere on its own.
Instance Method Summary collapse
-
#tooltip_data(title, placement: nil) ⇒ Hash
What an element carries to be given a tooltip: the controller that makes one, and what it says.
Instance Method Details
#tooltip_data(title, placement: nil) ⇒ Hash
What an element carries to be given a tooltip: the controller that makes one, and
what it says. bs_title is the name Bootstrap's own tooltip reads.
10 11 12 |
# File 'lib/bh/helpers/tooltips.rb', line 10 def tooltip_data(title, placement: nil) { controller: 'tooltip', bs_placement: placement, bs_title: title }.compact end |