I'm trying to translate https://github.com/lifo/docrails/blob/master/activerecord/lib/active_record/associations.rb
In my controller file I have:
@book = Book.find(params[:id])
begin
@book.destroy
rescue ActiveRecord::DeleteRestrictionError => e
flash[:error]= e.message # <<< Translate this message ?
end
This is the translation file I use : https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/th.rb
How do I write code for translate "#{e.message}"
?