Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 2, 2013
  1. Patrick Robertson

    Convert ActiveModel to 1.9 hash syntax.

    patricksrobertson authored
    I also attempted to fix other styleguide violations such as
    { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
Commits on Oct 26, 2012
  1. Francesco Rodríguez
Commits on Oct 21, 2012
  1. Francesco Rodríguez
Commits on Aug 24, 2012
  1. Gabriel Sobrinho
Commits on Jul 20, 2012
  1. Rafael Mendonça França
  2. Rafael Mendonça França
Commits on Jul 10, 2012
  1. Bogdan Gusiev
Commits on Jul 5, 2012
  1. Francesco Rodríguez
  2. Francesco Rodríguez
Commits on Jun 25, 2012
  1. Francesco Rodríguez
Commits on Jun 11, 2012
  1. Akira Matsuda
Commits on May 16, 2012
  1. Francesco Rodríguez
  2. Francesco Rodríguez
  3. Francesco Rodríguez
Commits on Mar 28, 2012
  1. Rafael Mendonça França

    Remove code duplication in InclusionValidator and ExclusionValidator.

    rafaelfranca authored
    Orginal code by @jamescook
    
    Closes #1352
    
    [Rafael Mendonça França + James Cook]
Commits on Aug 17, 2011
  1. Bogdan Gusiev

    Implemented strict validation concept

    bogdan authored
    In order to deliver debug information to dev team
    instead of display error message to end user
    Implemented strict validation concept
    that suppose to define validation that always raise exception when fails
Commits on Jun 1, 2011
  1. Guillermo Iguaran
Commits on May 23, 2011
  1. Sebastian Martinez
Commits on Apr 11, 2011
  1. José Valim

    Remove code duplication.

    josevalim authored
  2. José Valim

    No need to rescue here. Invoking the wrong method in an object can ha…

    josevalim authored
    …ppen anywhere if you are not careful. In other words, test your shit.
  3. José Valim

    Revert "Add :use_include option to allow user to explicitly use `Rang…

    josevalim authored
    …e#include?` method in Ruby 1.9"
    
    Use :with => range.to_a instead.
    
    This reverts commit f654021.
Commits on Apr 10, 2011
  1. Prem Sichanugrist José Valim

    Add :use_include option to allow user to explicitly use `Range#includ…

    sikachu authored josevalim committed
    …e?` method in Ruby 1.9
    
    In Ruby 1.9 we're currently use `Range#cover?` to fix the performance problem. However, there might be the case that you want to use `Range#include?` instead. This patch will give you that option.
  2. Prem Sichanugrist José Valim

    Add support for proc or lambda as an option for InclusionValidator, E…

    sikachu authored josevalim committed
    …xclusionValidator, and FormatValidator
    
    You can now use a proc or lambda in :in option for InclusionValidator and ExclusionValidator, and :with, :without option for FormatValidator
Commits on Feb 21, 2011
  1. Xavier Noria

    copy-edits 8d96b89

    fxn authored
Commits on Jun 21, 2010
  1. José Valim
  2. Jeroen van Dijk José Valim

    Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an opt…

    jeroenvandijk authored josevalim committed
    …ions 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: José Valim <jose.valim@gmail.com>
Commits on Jun 15, 2010
  1. Rizwan Reza
Commits on May 15, 2010
  1. José Valim

    Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accep…

    josevalim authored
    …t 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 bc1c8d5.
  2. Jeroen van Dijk Jeremy Kemper

    Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an opt…

    jeroenvandijk authored jeremy committed
    …ions 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: Jeremy Kemper <jeremy@bitsweat.net>
Commits on May 13, 2010
  1. Josh Kalderimis

    validation macros can now be used within an instance

    joshk authored Carl Lerche committed
Commits on May 3, 2010
  1. Lawrence Pit José Valim

    Favor %{} in all code instead of (deprecated) {{}} as interpolation s…

    lawrencepit authored josevalim committed
    …yntax for I18n
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Jan 8, 2010
  1. José Valim

    Compile length validator options still at the class level, so wheneve…

    josevalim authored
    …r the validator is called, it just needs to check for :maximum, :minimum and :is values.
Commits on Jan 7, 2010
  1. Jamie Hill José Valim

    Add validates method as shortcut to setup validators for a given set …

    thelucid authored josevalim committed
    …of attributes:
    
    class Person < ActiveRecord::Base
      include MyValidators
    
      validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 }
      validates :email, :presence => true, :email => true
    end
    
    [#3058 status:resolved]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Dec 23, 2009
  1. José Valim
Commits on Dec 22, 2009
  1. José Valim

    Move validations in ActiveModel to validators, however all validatity…

    josevalim authored
    … checks are still in the class method.
Something went wrong with that request. Please try again.