Module: PrototypeReplacementHelper
- Defined in:
- app/helpers/prototype_replacement_helper.rb
Overview
rubocop:todo Style/Documentation
Instance Method Summary collapse
- #remote_button(label, url, data, html_options = {}) ⇒ Object
- #tooltip(name = 'Help', opts = {}, &block) ⇒ Object
Instance Method Details
#remote_button(label, url, data, html_options = {}) ⇒ Object
2 3 4 5 6 |
# File 'app/helpers/prototype_replacement_helper.rb', line 2 def (label, url, data, = {}) form_tag url, remote: true, data: data, class: 'remote-form' do submit_tag(label, ) end end |
#tooltip(name = 'Help', opts = {}, &block) ⇒ Object
8 9 10 11 12 |
# File 'app/helpers/prototype_replacement_helper.rb', line 8 def tooltip(name = 'Help', opts = {}, &block) = tag.span(name, class: 'btn btn-info popover-trigger', 'data-content': capture(opts, &block), 'data-toggle': 'popover', 'data-title': opts.fetch(:title, 'About this')) concat end |