This project is archived and is in readonly mode.
Deprecation of old AR error message interpolation vars too greedy
Reported by Sven Fuchs | July 8th, 2009 @ 06:03 PM | in 2.x
I18n::Backend::Simple#interpolate_with_deprecated_syntax (part of ActiveRecord) makes old error messages (pre 2.2) still work with current ActiveRecord I18n. It's a bit too greedy though resulting in problems with Strings that are supposed to contain %d placeholders, like date formats.
The attached patch fixes that and makes #interpolate_with_deprecated_syntax only kick in when the user passed interpolation values to #t at all.
This should go into all upcoming 2.x versions as it's really a bug :) Afaik it doesn't need to go into 3.0 as the deprecation already has been entirely removed from that branch.
Comments and changes to this ticket
-
Repository August 2nd, 2009 @ 04:51 AM
- State changed from new to committed
(from [bf00de03dee5fba0b53f0fc1bb19464422550aa9]) Stop messing with supposedly-deprecated interpolation placeholders when no interpolation values have been passed.
[#2885 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/bf00de03dee5fba0b53f0fc1bb1946...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
- Nobody is watching this ticket.
Attachments
Tags
Referenced by
- 2885 Deprecation of old AR error message interpolation vars too greedy [#2885 state:committed]