File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ module Cacheable
15
15
# plural model name.
16
16
#
17
17
# If new_record? - will append /new
18
- # If not - will append /id-updated_at.to_s (cache_timestamp_format)
18
+ # If not - will append /id-updated_at.to_formatted_s (cache_timestamp_format)
19
19
# Without updated_at - will append /id
20
20
#
21
21
# This is usually called inside a cache() block
@@ -26,7 +26,7 @@ module Cacheable
26
26
# @return [ String ] the string with or without updated_at
27
27
def cache_key
28
28
return "#{ model_key } /new" if new_record?
29
- return "#{ model_key } /#{ _id } -#{ updated_at . utc . to_s ( cache_timestamp_format ) } " if do_or_do_not ( :updated_at )
29
+ return "#{ model_key } /#{ _id } -#{ updated_at . utc . to_formatted_s ( cache_timestamp_format ) } " if do_or_do_not ( :updated_at )
30
30
"#{ model_key } /#{ _id } "
31
31
end
32
32
end
Original file line number Diff line number Diff line change 45
45
context "with the default cache_timestamp_format" do
46
46
47
47
let! ( :updated_at ) do
48
- document . updated_at . utc . to_s ( :nsec )
48
+ document . updated_at . utc . to_formatted_s ( :nsec )
49
49
end
50
50
51
51
it "has the id and updated_at key name" do
64
64
end
65
65
66
66
let! ( :updated_at ) do
67
- document . updated_at . utc . to_s ( :number )
67
+ document . updated_at . utc . to_formatted_s ( :number )
68
68
end
69
69
70
70
it "has the id and updated_at key name" do
103
103
end
104
104
105
105
let! ( :updated_at ) do
106
- agent . updated_at . utc . to_s ( :nsec )
106
+ agent . updated_at . utc . to_formatted_s ( :nsec )
107
107
end
108
108
109
109
it "has the id and updated_at key name" do
You can’t perform that action at this time.
0 commit comments