This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActionView | |
module Helpers | |
module TranslationHelper | |
# Override translate method to consider translate_scope. | |
def translate(key, options = {}) | |
I18n.translate(key, {:raise => I18n.raise_on_missing, :scope => (translate_scope.dup << options.delete(:add_scope)).compact}.merge(options)) | |
end | |
alias :t :translate | |
# Append scopes to the current translation scope. |