Module: Addressbook::ApplicationHelper

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

Instance Method Summary collapse

Instance Method Details

#bootstrap_class_for(flash_type) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'app/helpers/addressbook/application_helper.rb', line 3

def bootstrap_class_for(flash_type)
  case flash_type.to_sym
    when :alert
      "warning"
    when :notice
      "info"
    else
      flash_type.to_s
  end
end

#phone_icon_class(phone_type) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'app/helpers/addressbook/application_helper.rb', line 14

def phone_icon_class(phone_type)
  case phone_type
    when 'home', 'cell'
      'earphone'
    when 'mobile', 'iPhone'
      'phone'
    else
      'phone-alt'
  end
end