Module: BootstrapConcerns::ComponentsHelper
- Defined in:
- lib/bootstrap_concerns/components_helper.rb
Instance Method Summary collapse
- #bs_button_to(name = nil, options = nil, html_options = nil) ⇒ Object
- #bs_link_or_button_to(method_name, name, options, html_options) ⇒ Object
- #bs_link_to(name = nil, options = nil, html_options = nil) ⇒ Object
- #flash_alert_color(key) ⇒ Object
Instance Method Details
#bs_button_to(name = nil, options = nil, html_options = nil) ⇒ Object
3 4 5 |
# File 'lib/bootstrap_concerns/components_helper.rb', line 3 def (name = nil, = nil, = nil, &) (:button_to, name, , , &) end |
#bs_link_or_button_to(method_name, name, options, html_options) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bootstrap_concerns/components_helper.rb', line 11 def (method_name, name, , , &) = if block_given? ||= {} else ||= {} end .merge!(Option.()) public_send( method_name, name, , , & ) end |
#bs_link_to(name = nil, options = nil, html_options = nil) ⇒ Object
7 8 9 |
# File 'lib/bootstrap_concerns/components_helper.rb', line 7 def bs_link_to(name = nil, = nil, = nil, &) (:link_to, name, , , &) end |
#flash_alert_color(key) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bootstrap_concerns/components_helper.rb', line 30 def flash_alert_color(key) case key.to_s when "notice" "success" when "alert" "danger" else key end end |