How to use I18n from controller in Rails
In controller you use it like this
I18n.t 'controllers.admin.pet.treated'
Using t()
directly enables lazy loading:
t(".treated") #loads from key: controllers.admin.pet.treated
In controller you use it like this
I18n.t 'controllers.admin.pet.treated'
Using t()
directly enables lazy loading:
t(".treated") #loads from key: controllers.admin.pet.treated