Module: Jackpot::ApplicationHelper
- Defined in:
- app/helpers/jackpot/application_helper.rb
Instance Method Summary collapse
- #navbar_entry(name, options = {}, html_options = {}, &block) ⇒ Object
- #twitterized_type(type) ⇒ Object
Instance Method Details
#navbar_entry(name, options = {}, html_options = {}, &block) ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/helpers/jackpot/application_helper.rb', line 18 def (name, = {}, = {}, &block) if current_page?() content_tag("li", class: "active") { link_to(name, , , &block) } else content_tag("li") { link_to(name, , , &block) } end end |
#twitterized_type(type) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/jackpot/application_helper.rb', line 3 def twitterized_type(type) case type when :alert "alert" when :error "alert alert-error" when :notice "alert alert-success" when :info "alert alert-info" else type.to_s end end |