diff options
author | Xavier Noria <fxn@hashref.com> | 2010-03-31 07:47:58 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-03-31 07:47:58 -0700 |
commit | 824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8 (patch) | |
tree | 1967c2a945d6e131d467fb4f0178a0f60e01ae8a /activemodel | |
parent | 1ed1652bef981d9402797b6cb9f0920a40eea21a (diff) | |
parent | db28d407f76a790a31e27bf51560e23425dd6944 (diff) | |
download | rails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.tar.gz rails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.tar.bz2 rails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.zip |
Merge commit 'rails/master'
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/dirty.rb | 3 | ||||
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 1 | ||||
-rw-r--r-- | activemodel/lib/active_model/validations/inclusion.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/validator.rb | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index cb67ef7270..2d5acdfced 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -1,4 +1,7 @@ +require 'active_model/attribute_methods' +require 'active_support/concern' require 'active_support/hash_with_indifferent_access' +require 'active_support/core_ext/object/duplicable' module ActiveModel # <tt>ActiveModel::Dirty</tt> provides a way to track changes in your diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index a9a54a90e0..8d28040c32 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/string/inflections' +require 'active_support/core_ext/object/blank' require 'active_support/ordered_hash' module ActiveModel diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index 0c1334fe1b..c1838bb93e 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -4,7 +4,7 @@ module ActiveModel def check_validity! raise ArgumentError, "An object with the method include? is required must be supplied as the " << ":in option of the configuration hash" unless options[:in].respond_to?(:include?) - end + end def validate_each(record, attribute, value) return if options[:in].include?(value) diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb index b7c52be3f0..906d239bcc 100644 --- a/activemodel/lib/active_model/validator.rb +++ b/activemodel/lib/active_model/validator.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/array/wrap' require "active_support/core_ext/module/anonymous" +require 'active_support/core_ext/object/blank' module ActiveModel #:nodoc: # A simple base class that can be used along with |