Permalink
Browse files

Merge pull request #110 from nathanl/master

Documented translate! method
  • Loading branch information...
2 parents 89ea337 + 5e2f7ed commit 391e6f5019595c57fdd5d993bde11803d0565d73 @tigrish tigrish committed Jul 1, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/i18n.rb
View
@@ -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

0 comments on commit 391e6f5

Please sign in to comment.