Skip to content

Instantly share code, notes, and snippets.

@ArthurN
Created December 2, 2013 01:07
Show Gist options
  • Save ArthurN/7743315 to your computer and use it in GitHub Desktop.
Save ArthurN/7743315 to your computer and use it in GitHub Desktop.
Monkey-patch Rails I18n.translate to see what keys ActiveModel is trying to use.
#initializers/i18n.rb
I18n.module_eval do
class << self
def translate_with_puts(*args)
Rails.logger.debug "#{args}"
old_translate(*args)
end
alias :old_translate :translate
alias :translate :translate_with_puts
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment