Access translation file (i18n) from inside rails model

Call:

I18n.t 

instead of simple t. t is a helper method only available in the views, delegating the whole logic to I18n module.

UPDATE:

As mentioned in the comments, view helper is not only delegating to the I18n module, it makes sure that you can use a default scopes as well.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)