Module: Binco::ButtonLinkHelper
- Defined in:
- app/helpers/binco/button_link_helper.rb
Instance Method Summary collapse
- #button_danger_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
- #button_default_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
- #button_info_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
- #button_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
- #button_primary_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
- #button_success_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
- #button_warning_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
Instance Method Details
#button_danger_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
21 22 23 24 |
# File 'app/helpers/binco/button_link_helper.rb', line 21 def (name = nil, = nil, = {}, &block) [:type] = :danger (name, , , &block) end |
#button_default_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
16 17 18 19 |
# File 'app/helpers/binco/button_link_helper.rb', line 16 def (name = nil, = nil, = {}, &block) [:type] = :default (name, , , &block) end |
#button_info_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
36 37 38 39 |
# File 'app/helpers/binco/button_link_helper.rb', line 36 def (name = nil, = nil, = {}, &block) [:type] = :info (name, , , &block) end |
#button_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/helpers/binco/button_link_helper.rb', line 3 def (name = nil, = nil, = {}, &block) [:type] ||= :default [:class] ||= '' [:class] << ' ' if [:class].length > 1 [:class] << "btn btn-#{[:type]}" link_to(name, , .except(:type), &block) end |
#button_primary_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
11 12 13 14 |
# File 'app/helpers/binco/button_link_helper.rb', line 11 def (name = nil, = nil, = {}, &block) [:type] = :primary (name, , , &block) end |
#button_success_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
31 32 33 34 |
# File 'app/helpers/binco/button_link_helper.rb', line 31 def (name = nil, = nil, = {}, &block) [:type] = :success (name, , , &block) end |
#button_warning_link_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object
26 27 28 29 |
# File 'app/helpers/binco/button_link_helper.rb', line 26 def (name = nil, = nil, = {}, &block) [:type] = :warning (name, , , &block) end |