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
- #chrome ⇒ Object
- #created_at_column(record, b = nil) ⇒ Object
- #updated_at_column(record, b = nil) ⇒ Object
- #updated_version_column(record, b = nil) ⇒ Object
Instance Method Details
#chrome ⇒ Object
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 <<STREND <!--[if IE]> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script> <style> </style> <script> // The conditional ensures that this code will only execute in IE, // Therefore we can use the IE-specific attachEvent without worry window.attachEvent("onload", function() { CFInstall.check({ mode: "overlay" }); }); </script> <![endif]--> STREND 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 |