cacheable_date_helper 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module CacheableDateHelper
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -8,7 +8,7 @@ module CacheableDateHelper
8
8
  # Example: cacheable_time_ago_in_words(Time.zone.now - 2 minutes) # => <span class="time_ago_in_words" data-timestamp="Mon Jul 18 12:21:12 UTC 2011" data-include-seconds="false">18 Jul 14:21</span>
9
9
  # Which will be replaced by the client-side javascript with: <span class="time_ago_in_words" data-timestamp="Mon Jul 18 12:22:11 UTC 2011" data-include-seconds="false">2 minutes ago</span>
10
10
  def cacheable_time_ago_in_words(date_with_timezone, include_seconds = false)
11
- raw "<span class=\"time_ago_in_words\" data-timestamp=\"#{date_with_timezone.utc}\" data-include-seconds=\"#{include_seconds}\">#{I18n.l(date_with_timezone, :format => :short)}</span>"
11
+ "<span class=\"time_ago_in_words\" data-timestamp=\"#{date_with_timezone.utc}\" data-include-seconds=\"#{include_seconds}\">#{I18n.l(date_with_timezone, :format => :short)}</span>".html_safe
12
12
  end
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cacheable_date_helper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Murui