Module: ApplicationHelper

Defined in:
lib/orats/templates/base/app/helpers/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#css_for_boolean(input) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/orats/templates/base/app/helpers/application_helper.rb', line 24

def css_for_boolean(input)
  if input
    'success'
  else
    'danger'
  end
end

#heading(page_heading) ⇒ Object



10
11
12
# File 'lib/orats/templates/base/app/helpers/application_helper.rb', line 10

def heading(page_heading)
  content_for(:heading) { page_heading }
end

#humanize_boolean(input) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/orats/templates/base/app/helpers/application_helper.rb', line 14

def humanize_boolean(input)
  input ||= ''
  case input.to_s.downcase
  when 't', 'true'
    'Yes'
  else
    'No'
  end
end

#meta_description(page_meta_description) ⇒ Object



6
7
8
# File 'lib/orats/templates/base/app/helpers/application_helper.rb', line 6

def meta_description(page_meta_description)
  content_for(:meta_description) { page_meta_description }
end

#title(page_title) ⇒ Object



2
3
4
# File 'lib/orats/templates/base/app/helpers/application_helper.rb', line 2

def title(page_title)
  content_for(:title) { page_title }
end