回答編集履歴

2

追記

2019/03/02 13:05

投稿

asm
asm

スコア15147

test CHANGED
@@ -49,3 +49,7 @@
49
49
  end
50
50
 
51
51
  ```
52
+
53
+
54
+
55
+ **追記**: 1月以上になるとこの方法だと問題が出てきます

1

修正

2019/03/02 13:05

投稿

asm
asm

スコア15147

test CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
  def remaining
28
28
 
29
- ActiveSupport::Duration.build(ends_at - Time.current)
29
+ ActiveSupport::Duration.build(ends_at - Time.current).parts
30
30
 
31
31
  end
32
32