From Rail 3, I'm used to do this:
User.model_name.human count: 2 # "Users"
This doesn't seem to work in Rails 4?
[1] base » User.model_name.human count: 2
=> "User"
While pluralizing a simple string seems to work:
[2] base » "User".pluralize
=> "Users"
Any idea what's the problem here?
This requires that you have modified your language *.yml as such:
activerecord:
...
models:
sheet:
one: User
other: Users
According to this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With