From 21e7b8462113fc7c0fd1882dcc2bf7225de67b1a Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 12 Oct 2009 22:15:43 -0500 Subject: Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks --- activemodel/lib/active_model/validations.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'activemodel/lib') 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 -- cgit v1.2.3