aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/validations.rb')
-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