I started cleaning up my models and controllers by outsourcing the sending of notification mails into an observer.
There is one problem I noticed by moving this from controller to observer:
If I call ‘translate’ or the shorthand ‘t’ I get the answer “Method not defined”
Ok, I really like the rails implementation for internationalisation.
But how can it be used in models and observers?
You can call the method via the I18n object: