K
K
Kolya2016-06-02 21:46:03
Ruby on Rails
Kolya, 2016-06-02 21:46:03

Can't dup Fixnum when calling t(), what should I do?

View file: ru.yml
t('comments', @post.comments.count)

ru:
  comments:
    one: "Комментарий %{count}"
    other: "Комментариев %{count}"

Error occurs: bcfe89cc883f4e6da8f0d141a1c0e0ad.PNG
Why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Demidenko, 2016-06-02
@Dev_Kpug

t('comments', count: @post.comments.count)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question