Skip to content

Commit 227611c

Browse files
committed
Add time_ago helper method
1 parent 7395af7 commit 227611c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/helpers/puzzles_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
module PuzzlesHelper
2+
def time_ago(past_time)
3+
"#{time_ago_in_words(past_time)} ago"
4+
end
25
end

app/views/puzzles/_puzzles_table.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<% end %>
2525
</td>
2626
<% if actions == :archived %>
27-
<td><%= time_ago_in_words(puzzle.sent_at) %> ago</td>
27+
<td><%= time_ago(puzzle.sent_at) %></td>
2828
<% end %>
2929
<td>
3030
<% if actions == :pending %>

0 commit comments

Comments
 (0)