This project is archived and is in readonly mode.
ActiveRercord::Error broke errors.add(attribute, type, :default => message)
Reported by José Valim | December 11th, 2009 @ 09:20 PM | in 2.3.6
Previously, this worked:
errors.add(:email, :not_found, :default => "not found")
Today, it does not work because it completely ignores the :not_found type and does the I18n lookup using "not found" instead. A patch with a fix and test case is attached.
Comments and changes to this ticket
-
Repository December 16th, 2009 @ 08:19 PM
(from [1c3711b21b5c80343a51e19504552b3f6c34ac73]) Fix another regression due to the inclusion of ActiveRecord::Error.
If a string is supplied to :default, it should not be used a
translation key (we already have :message for that).
[#3564 status:resolved]Signed-off-by: Joshua Peek josh@joshpeek.com
http://github.com/rails/rails/commit/1c3711b21b5c80343a51e19504552b... -
josh December 16th, 2009 @ 08:19 PM
- State changed from new to resolved
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
Referenced by
- 3564 ActiveRercord::Error broke errors.add(attribute, type, :default => message) If a string is supplied to :default, it should not be use...