Class: Megatron::TabHelper::Tabs
- Inherits:
-
BlockHelpers::Base
- Object
- BlockHelpers::Base
- Megatron::TabHelper::Tabs
- Defined in:
- app/helpers/megatron/tab_helper.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#display(body) ⇒ Object
18 19 20 |
# File 'app/helpers/megatron/tab_helper.rb', line 18 def display(body) content_tag(:nav, class: 'tabs') { body } end |
#tab(text, href, options = {}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/helpers/megatron/tab_helper.rb', line 4 def tab(text, href, = {}) [:class] = add_class([:class], "tab") [:class] = add_class([:class], "here") if test_current_page([:here_if]) content_tag :a, class: [:class], href: href do text end end |
#tab_button(text, href) ⇒ Object
12 13 14 15 16 |
# File 'app/helpers/megatron/tab_helper.rb', line 12 def (text, href) content_tag :a, class: %w{tab-btn btn medium}, href: href do text end end |