Whilst trying to localize the date/time tag 2009-12-01 21:49:59 +0900
I kept getting the error TypeError: can't convert nil into String
coming from activesupport-2.3.4/lib/active_support/vendor/i18n-0.1.3/
lib/i18n/backend/simple.rb:62:in `gsub!'
The code happened to be
format.gsub!(/%b/, translate(locale, :"date.abbr_month_names")
[object.mon])
format.gsub!(/%B/, translate(locale, :"date.month_names")
[object.mon])
object.mon was being called as 12, where the array index would have
been 11 for the 12th item hence the error being made,
I added a dummy 0 month item in my localization file and it worked...
Is this a bug?
Please let me know...
Cheers
Richard
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.