Last active
November 7, 2017 22:19
-
-
Save danielsousaio/751ca3c9372ed215195b00c0c950caca to your computer and use it in GitHub Desktop.
PORO with ActiveModel::Naming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
activerecord: | |
models: | |
something: | |
one: Something | |
other: Somethings | |
class Something | |
extend ActiveModel::Naming | |
end | |
Something.model_name.human(count: :many) # => "Something" | |
class Something | |
extend ActiveModel::Naming | |
extend ActiveModel::Translation | |
end | |
Something.model_name.human(count: :many) # => "Somethings" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment