1. 01 12月, 2010 3 次提交
  2. 25 9月, 2010 1 次提交
  3. 30 8月, 2010 2 次提交
  4. 14 8月, 2010 2 次提交
  5. 04 8月, 2010 1 次提交
  6. 03 8月, 2010 1 次提交
  7. 02 8月, 2010 1 次提交
  8. 30 7月, 2010 1 次提交
  9. 03 7月, 2010 1 次提交
  10. 26 6月, 2010 1 次提交
  11. 23 6月, 2010 1 次提交
  12. 21 6月, 2010 2 次提交
    • J
      Refactor previous commit a bit [#4057 state:resolved] · 0421fb7a
      José Valim 提交于
      0421fb7a
    • J
      Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options hash... · 26392c4a
      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>
      26392c4a
  13. 14 6月, 2010 1 次提交
  14. 11 6月, 2010 1 次提交
  15. 03 6月, 2010 1 次提交
  16. 01 6月, 2010 1 次提交
  17. 16 5月, 2010 2 次提交
    • J
      Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an... · d6cbb27e
      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.
      d6cbb27e
    • J
      Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options hash... · 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>
      bc1c8d58
  18. 01 5月, 2010 1 次提交
  19. 10 4月, 2010 1 次提交
  20. 03 4月, 2010 1 次提交
  21. 28 3月, 2010 2 次提交
  22. 01 2月, 2010 1 次提交
  23. 30 1月, 2010 1 次提交
  24. 17 1月, 2010 4 次提交
  25. 07 1月, 2010 1 次提交
  26. 03 1月, 2010 2 次提交
  27. 21 10月, 2009 1 次提交
  28. 18 9月, 2009 2 次提交