Skip to content

Commit 195c3e5

Browse files
committed
docs: Rails 標準ヘルパーとの違いを説明するコメントを追加
1 parent 0da6b78 commit 195c3e5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/helpers/dojo_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ def link_to_record_date(dojo)
143143
end
144144

145145
# 経過日数の表示を生成
146+
# Rails の time_ago_in_words だと「約12ヶ月」のような曖昧な表現になるため、
147+
# 正確な日数表示と expired 判定を含むカスタムヘルパーを実装
146148
def display_days_passed(dojo)
147149
days_passed = days_passed_from_record_date(dojo)
148150

0 commit comments

Comments
 (0)