aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-10-13 15:06:43 -0300
committerEmilio Tagua <miloops@gmail.com>2009-10-13 15:06:43 -0300
commit991d1bc200d6fdc379bc83610bc92a4e220c669e (patch)
tree84ace4c9c117ba7bc82824dbddf15485a9305bd2 /activemodel/lib/active_model
parent0cf4662ec589813c4fdc22de3398730cab05c5ed (diff)
parent9cd50e7752650a3d6bf8545b51d50619d6e70c0b (diff)
downloadrails-991d1bc200d6fdc379bc83610bc92a4e220c669e.tar.gz
rails-991d1bc200d6fdc379bc83610bc92a4e220c669e.tar.bz2
rails-991d1bc200d6fdc379bc83610bc92a4e220c669e.zip
Merge commit 'rails/master'
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/validations.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb
index edeb508a08..0f178a07c8 100644
--- a/activemodel/lib/active_model/validations.rb
+++ b/activemodel/lib/active_model/validations.rb
@@ -1,12 +1,10 @@
require 'active_support/core_ext/array/extract_options'
require 'active_support/core_ext/hash/keys'
-require 'active_support/concern'
-require 'active_support/callbacks'
module ActiveModel
module Validations
extend ActiveSupport::Concern
- include ActiveSupport::NewCallbacks
+ include ActiveSupport::Callbacks
included do
define_callbacks :validate, :scope => :name
@@ -99,7 +97,7 @@ module ActiveModel
def invalid?
!valid?
end
-
+
protected
# Hook method defining how an attribute value should be retieved. By default this is assumed
# to be an instance named after the attribute. Override this method in subclasses should you
@@ -110,9 +108,9 @@ module ActiveModel
# def initialize(data = {})
# @data = data
# end
- #
+ #
# private
- #
+ #
# def read_attribute_for_validation(key)
# @data[key]
# end