- 21 6月, 2010 1 次提交
-
-
由 Jeroen van Dijk 提交于
Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options hash and make various Validators pass their (filtered) options. This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format". Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation. Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options). Also, refactoring of ActiveModel and ActiveRecord Validation tests. Test are a lot more DRY now. Better test coverage as well now. The first four points were reapplied from an older patch of Sven Fuchs which didn't apply cleanly anymore and was not complete yet. Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 14 6月, 2010 1 次提交
-
-
由 Rizwan Reza 提交于
-
- 11 6月, 2010 1 次提交
-
-
由 Evgeniy Dolzhenko 提交于
-
- 03 6月, 2010 1 次提交
-
-
由 Xavier Noria 提交于
-
- 01 6月, 2010 1 次提交
-
-
由 Xavier Noria 提交于
-
- 16 5月, 2010 2 次提交
-
-
由 José Valim 提交于
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 bc1c8d58.
-
由 Jeroen van Dijk 提交于
Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options hash and make various Validators pass their (filtered) options. This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format". Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation. Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options). Original patch by Sven Fuchs, some minor changes and has been changed to be applicable to master again [#4057 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 01 5月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 10 4月, 2010 1 次提交
-
-
由 Ryan Bigg 提交于
Re-define empty? for errors to check if the values inside the OrderedHash are empty rather than the OrderedHash itself. [#4356 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 03 4月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
Signed-off-by: Nwycats <wycats@gmail.com>
-
- 28 3月, 2010 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Jeremy Kemper 提交于
-
- 01 2月, 2010 1 次提交
-
-
由 Mikel Lindsaar 提交于
-
- 30 1月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 17 1月, 2010 4 次提交
-
-
由 Samuel Elliott 提交于
Adding Proc support to validation messages so that they can become a little more dynamic, allowing for customisations during the request [#3514 status:resolved]. Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
由 Mikel Lindsaar 提交于
-
由 Mikel Lindsaar 提交于
-
由 Mikel Lindsaar 提交于
-
- 07 1月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 03 1月, 2010 2 次提交
-
-
由 José Valim 提交于
-
由 José Valim 提交于
Be sure to convert namespaced names to we have 'Parrots name' instead of 'Parrots.name' in error messages.
-
- 21 10月, 2009 1 次提交
-
-
由 José Valim 提交于
Move validator, human_name and human_attribute_name to ActiveModel, remove deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: NCarl Lerche <carllerche@mac.com>
-
- 18 9月, 2009 2 次提交
-
-
由 Jay Pignata 提交于
-
由 Brian Donovan 提交于
Signed-off-by: NYehuda Katz <wycats@gmail.com>
-
- 12 9月, 2009 1 次提交
-
-
由 Akira Matsuda 提交于
[#2301 state:committed milestone:2.3.5] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 06 8月, 2009 2 次提交
-
-
由 Pratik Naik 提交于
-
由 James Hill 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
- 31 7月, 2009 1 次提交
-
-
由 Rodrigo Rosenfeld Rosas 提交于
-
- 18 6月, 2009 1 次提交
-
-
由 Joshua Peek 提交于
-
- 09 6月, 2009 2 次提交
-
-
由 Jeremy Kemper 提交于
-
由 Joshua Peek 提交于
-
- 21 3月, 2009 1 次提交
-
-
由 Pratik Naik 提交于
-
- 20 3月, 2009 2 次提交
-
-
由 Pratik Naik 提交于
-
由 Pratik Naik 提交于
-
- 07 12月, 2008 1 次提交
-
-
由 Pratik Naik 提交于
-
- 19 11月, 2008 1 次提交
-
-
由 Mike Gunderloy 提交于
-
- 01 4月, 2008 1 次提交
-
-
由 David Heinemeier Hansson 提交于
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-