Module: ThecoreHelper

Defined in:
app/helpers/thecore_helper.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap_class_for(flash_type) ⇒ Object



2
3
4
5
6
7
8
9
# File 'app/helpers/thecore_helper.rb', line 2

def bootstrap_class_for(flash_type)
  {
      success: "alert-success",
      error: "alert-error",
      alert: "alert-danger",
      notice: "alert-info"
  }[flash_type.to_sym] || flash_type.to_s
end

#bootstrap_glyphs_icon(flash_type) ⇒ Object



11
12
13
14
15
16
17
18
# File 'app/helpers/thecore_helper.rb', line 11

def bootstrap_glyphs_icon(flash_type)
  {
      success: "glyphicon-ok",
      error: "glyphicon-exclamation-sign",
      alert: "glyphicon-warning-sign",
      notice: "glyphicon-info-sign"
  }[flash_type.to_sym] || 'glyphicon-screenshot'
end

#meta_description(meta_description) ⇒ Object



24
25
26
# File 'app/helpers/thecore_helper.rb', line 24

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

#og_description(og_description) ⇒ Object



32
33
34
# File 'app/helpers/thecore_helper.rb', line 32

def og_description(og_description)
  content_for(:og_description) { og_description }
end

#og_image(og_image) ⇒ Object



36
37
38
# File 'app/helpers/thecore_helper.rb', line 36

def og_image(og_image)
  content_for(:og_image) { og_image }
end

#og_title(og_title) ⇒ Object



28
29
30
# File 'app/helpers/thecore_helper.rb', line 28

def og_title(og_title)
  content_for(:og_title) { og_title }
end

#title(title) ⇒ Object



20
21
22
# File 'app/helpers/thecore_helper.rb', line 20

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