This project is archived and is in readonly mode.

Changeset [d6cbb27e7b260c970bf7d07dc0b0591ed82cee2a] by José Valim

May 15th, 2010 @ 08:55 PM

Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options hash and make various Validators pass their (filtered) options."

Having a huge array to whitelist options is not the proper way to handle this case. This means that the ActiveModel::Errors object should know about the options given in all validators and break the extensibility added by the validators itself. If the intent is to whitelist options before sending them to I18n, each validator should clean its respective options instead of throwing the responsibility to the Errors object.

This reverts commit bc1c8d58ec45593acba614d1d0fecb49adef08ff.
http://github.com/rails/rails/commit/d6cbb27e7b260c970bf7d07dc0b059...

Committed by José Valim

  • M activemodel/lib/active_model/errors.rb
  • M activemodel/lib/active_model/validations/acceptance.rb
  • M activemodel/lib/active_model/validations/confirmation.rb
  • M activemodel/lib/active_model/validations/exclusion.rb
  • M activemodel/lib/active_model/validations/format.rb
  • M activemodel/lib/active_model/validations/inclusion.rb
  • M activemodel/lib/active_model/validations/length.rb
  • M activemodel/lib/active_model/validations/numericality.rb
  • M activemodel/lib/active_model/validations/presence.rb
  • M activemodel/test/cases/validations/i18n_generate_message_validation_test.rb
  • M activemodel/test/cases/validations/i18n_validation_test.rb
  • M activerecord/lib/active_record/validations/associated.rb
  • M activerecord/lib/active_record/validations/uniqueness.rb
  • M activerecord/test/cases/validations/i18n_generate_message_validation_test.rb
  • M activerecord/test/cases/validations/i18n_validation_test.rb

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>