Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 15, 2010
  1. @josevalim

    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. @jeroenvandijk @jeremy

    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. @joshk

    minor changes to instance level validations implementation based on f…

    joshk authored Carl Lerche committed
    …eedback from José Valim
  2. @joshk

    validation macros can now be used within an instance

    joshk authored Carl Lerche committed
Commits on May 12, 2010
  1. @spastorino @josevalim

    Revert "Refactor of active_model/naming.rb and allow collection and e…

    spastorino authored josevalim committed
    …lement to be writable"
    
    This reverts commit f7862b2.
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
  2. @spastorino @jeremy

    Make ActiveResource serialize XML correctly when element_name is set.

    spastorino authored jeremy committed
    [#4529]
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  3. @spastorino @jeremy

    Refactor of active_model/naming.rb and allow collection and element t…

    spastorino authored jeremy committed
    …o be writable
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Commits on May 9, 2010
  1. @fxn
Commits on May 8, 2010
  1. @joshk

    updated AMo validations to use a context for valid? and invalid?, rem…

    joshk authored Carl Lerche committed
    …oving the dependency on AR
Commits on May 5, 2010
  1. @spastorino
Commits on May 4, 2010
  1. @rubymerchant @jeremy

    Active Model JSON serializer now supports custom root option

    rubymerchant authored jeremy committed
    [#4515 state:committed]
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Commits on May 3, 2010
  1. @lawrencepit @josevalim

    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 May 1, 2010
  1. @josevalim
Commits on Apr 29, 2010
  1. @josevalim

    Move several configuration values from Hash to ActiveSupport::XmlMini…

    josevalim authored
    …, which both Hash and Array depends on.
    
    Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
Commits on Apr 28, 2010
  1. @spastorino @josevalim

    Makes validates_acceptance_of to not override database fields [#4460

    spastorino authored josevalim committed
    …state:committed]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Apr 25, 2010
  1. @reu @josevalim

    Fix validates_numericaly_of only integer error message [#4406 state:r…

    reu authored josevalim committed
    …esolved]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Apr 22, 2010
  1. @josevalim
Commits on Apr 16, 2010
  1. @jeremy

    Fix Active Model observer tests

    jeremy authored
  2. @mislav @jeremy

    ActiveModel::Observing: stop using Observable Ruby module, re-impleme…

    mislav authored jeremy committed
    …nt `notify_observers`
    
    `Observable#notify_observers` from Ruby always returns false (which halts ActiveRecord
    callback chains) and has extra features (like `changed`) that were never used.
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Commits on Apr 10, 2010
  1. @radar @josevalim

    Re-define empty? for errors to check if the values inside the Ordered…

    radar authored josevalim committed
    …Hash are empty rather than the OrderedHash itself. [#4356 state:resolved]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
  2. @josevalim

    Update versions (otherwise you install a gem from source as beta3 but…

    josevalim authored
    … internally it's beta2) and update CHANGELOG.
Commits on Apr 9, 2010
  1. @spastorino @josevalim

    fix stack trace lines on class_eval

    spastorino authored josevalim committed
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Apr 2, 2010
  1. @tenderlove @wycats

    errors.rb needs to be declared as UTF-8 [#3941 state:resolved]

    tenderlove authored wycats committed
    Signed-off-by: wycats <wycats@gmail.com>
  2. @spohlenz @jeremy

    Restore changed_attributes method in ActiveModel::Dirty and loosen ex…

    spohlenz authored jeremy committed
    …pectation on including class' initialize method.
    
    [#4308 state:committed]
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Commits on Apr 1, 2010
  1. @dhh
Commits on Mar 28, 2010
  1. @jeremy
  2. @jeremy

    Cosmetics: mismatch indentation

    jeremy authored
  3. @fxn
  4. @fxn

    adds a few requires in active_model/dirty.rb

    fxn authored
    [#4284 state:committed]
Commits on Mar 27, 2010
  1. @jeremy

    Use Array.wrap uniformly

    jeremy authored
  2. @jeremy

    Fix unstated dep on HWIA

    jeremy authored
  3. @josevalim
  4. @jacobat @josevalim

    ActiveModel::Dirty#changes should return a HashWithIndifferentAccess [#…

    jacobat authored josevalim committed
    …4157 state:resolved]
    
    Keep the Rails style of inject
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Mar 26, 2010
  1. @wycats
  2. @josevalim
Something went wrong with that request. Please try again.