Module: ApplicationHelper

Defined in:
lib/six-updater-web/app/helpers/application_helper.rb

Overview

Methods added to this helper will be available to all templates in the application.

Instance Method Summary collapse

Instance Method Details

#chromeObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/six-updater-web/app/helpers/application_helper.rb', line 14

def chrome
  "<!--[if IE]>\n  <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js\"></script>\n  <style>\n  </style>\n\n  <script>\n   // The conditional ensures that this code will only execute in IE,\n   // Therefore we can use the IE-specific attachEvent without worry\n   window.attachEvent(\"onload\", function() {\n     CFInstall.check({\n       mode: \"overlay\"\n     });\n   });\n  </script>\n<![endif]-->\n"
end

#created_at_column(record, b = nil) ⇒ Object



3
4
5
# File 'lib/six-updater-web/app/helpers/application_helper.rb', line 3

def created_at_column(record, b = nil)
  time_ago_in_words(record.created_at) + "_ago" if record.created_at
end

#updated_at_column(record, b = nil) ⇒ Object



6
7
8
9
# File 'lib/six-updater-web/app/helpers/application_helper.rb', line 6

def updated_at_column(record, b = nil)
  #record.updated_at.to_s(:test)

  time_ago_in_words(record.updated_at) + "_ago" if record.updated_at
end

#updated_version_column(record, b = nil) ⇒ Object



10
11
12
# File 'lib/six-updater-web/app/helpers/application_helper.rb', line 10

def updated_version_column(record, b = nil)
  time_ago_in_words(record.updated_version) + "_ago" if record.updated_version
end