This project is archived and is in readonly mode.
Switch active_model to use I18n.translate method instead
Reported by Prem Sichanugrist (sikachu) | October 7th, 2008 @ 11:14 AM | in 3.0.2
Usually, when I run the application I keep getting an error in my log about deprecation of ActiveRecord::Errors.default_error_messages. So, I tracked out the error, and found out that ActiveModel was the one that actually raise this error.
So, I patched the files that referenced to ActiveRecord::Errors.default_error_messages, and hopefully this will be patched in the main branch.
Comments and changes to this ticket
-
Pratik January 18th, 2009 @ 05:57 AM
- Milestone cleared.
- Tag changed from 2.2, activemodel, bug, errors, i18n, patch to 2.2, activemodel, bug, errors, i18n, patch
- Assigned user set to Sven Fuchs
-
Pratik January 18th, 2009 @ 05:57 AM
- Milestone cleared.
-
Kieran P February 16th, 2009 @ 03:59 AM
+1
Got this in the logs. Using Rails 2.3 RC1:
DEPRECATION WARNING: ActiveRecord::Errors.default_error_messages has been deprecated. Please use I18n.translate('activerecord.errors.messages').. (called from default_error_messages at /Users/kieran/Work/kete_trunk/vendor/rails/activerecord/lib/active_record/validations.rb:24)
-
Sven Fuchs February 16th, 2009 @ 10:18 AM
I think Rick is working on this. Rick, will you take over the ticket?
-
CancelProfileIsBroken April 22nd, 2009 @ 10:21 PM
- Assigned user changed from Sven Fuchs to Rick
- Milestone set to 2.x
-
Kieran P August 7th, 2009 @ 11:50 AM
This problem is still present in Rails 2.3.3, and makes test output very cluttered. Any progress with fixing it?
-
josh August 10th, 2009 @ 02:36 AM
- Assigned user changed from Rick to josh
- Tag changed from 2.2, activemodel, bug, errors, i18n, patch to activemodel, bug, bugmash, errors, i18n
- State changed from new to open
- Milestone cleared.
Needs to be rebased against 3.0. AMo doesn't matter for 2.3.3 since the gem was never released.
-
Kieran P August 10th, 2009 @ 03:48 AM
Well there might be something causing it elsewhere, cause I get the deprecation warning on Rails 2.3.3.
-
Dan Croak August 10th, 2009 @ 04:03 AM
+1 verified patch applies if the second commit regarding I18n is deleted.
I believe the second commit is unnecessary because Edge Rails now elegantly handles #translate here:
lib/active_model/errors.rb
158: I18n.translate(key, options)I have attached a patch that is Sikachu!'s patch with the second commit removed. Should be good now in master with git apply.
-
Repository August 10th, 2009 @ 04:31 AM
- State changed from open to committed
(from [82dd725fc195eb52eea9cbde9530ab9dff122e32]) Fix that irregular plural inflections should not be double-pluralized: 'people'.pluralize should return 'people' not 'peoples'.
[#1183 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/82dd725fc195eb52eea9cbde9530ab... -
Jeremy Kemper August 10th, 2009 @ 04:32 AM
- Tag changed from activemodel, bug, bugmash, errors, i18n to activemodel, bug, errors, i18n
-
Prem Sichanugrist (sikachu) August 10th, 2009 @ 09:15 AM
Thank you Dan Croak for modified my patch. Actually it was my mistake that I made two commits into one change file. I posted a ticket to fix the bug about pluralize here:
https://rails.lighthouseapp.com/projects/8994/tickets/549-fix-infle...
I think that ticket should be changed from stale to fixed then :)
Thank you ;)
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
Attachments
Tags
Referenced by
- 1183 Switch active_model to use I18n.translate method instead [#1183 state:committed]