method
localize
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
Register or
log in
to add new notes.
sshaw -
April 22, 2010
ziemek -
March 14, 2011
![Default_avatar_30](https://www.gravatar.com/avatar/81d54b962bc79d931076a69373b8936d?default=http://apidock.com/images/default_avatar_30.png&size=30)
1 thank
nil Argument Raises An I18n::ArgumentError
You might want to do this:
module ActionView module Helpers module TranslationHelper def localize(*args) #Avoid I18n::ArgumentError for nil values I18n.localize(*args) unless args.first.nil? end # l() still points at old definition alias l localize end end
end
![Default_avatar_30](https://www.gravatar.com/avatar/d8959977d3366483c5496f44eda92fb4?default=http://apidock.com/images/default_avatar_30.png&size=30)
0 thanks