Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #110 from nathanl/master

Documented translate! method
  • Loading branch information...
commit 391e6f5019595c57fdd5d993bde11803d0565d73 2 parents 89ea337 + 5e2f7ed
@tigrish tigrish authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/i18n.rb
View
2  lib/i18n.rb
@@ -160,6 +160,8 @@ def translate(*args)
end
alias :t :translate
+ # Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
+ # this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
def translate!(key, options={})
translate(key, options.merge(:raise => true))
end
Please sign in to comment.
Something went wrong with that request. Please try again.