Module: Jackpot::ApplicationHelper

Defined in:
app/helpers/jackpot/application_helper.rb

Instance Method Summary collapse

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 navbar_entry(name, options = {}, html_options = {}, &block)
  if current_page?(options) 
    ("li", class: "active")  { link_to(name, options, html_options, &block) } 
  else
    ("li")                   { link_to(name, options, html_options, &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