Permalink
Browse files

Documentation for translate! method

  • Loading branch information...
Nathan Long
Nathan Long committed Oct 11, 2011
1 parent 541a05f commit 5e2f7eda96b03e452c0df8ce3286464d85de495e
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 5e2f7ed

Please sign in to comment.