Allow customizing the text to display poll dates

Since we were using `I18n.t`, our monkey-patch of the `t` helper wasn't
being applied.
This commit is contained in:
Javi Martín
2024-04-22 19:19:47 +02:00
parent d9662164b8
commit bb574db1ea
2 changed files with 18 additions and 5 deletions

View File

@@ -9,6 +9,6 @@ class Polls::PollComponent < ApplicationComponent
private
def dates
I18n.t("polls.dates", open_at: l(poll.starts_at.to_date), closed_at: l(poll.ends_at.to_date))
t("polls.dates", open_at: l(poll.starts_at.to_date), closed_at: l(poll.ends_at.to_date))
end
end