From 1c4d28ba314c8cdd0039becf3bc9e678219b8f46 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 17 Jun 2009 10:37:39 -0500 Subject: Move model naming into ActiveModel --- activerecord/lib/active_record/base.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 1fc0c93732..39fac0b7e7 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -3145,6 +3145,7 @@ module ActiveRecord #:nodoc: end Base.class_eval do + extend ActiveModel::Naming extend QueryCache::ClassMethods include Validations include Locking::Optimistic, Locking::Pessimistic -- cgit v1.2.3 From 7ac9f29093c8f4d9739008a52d7d3265cfb04e23 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 17 Jun 2009 13:05:14 -0700 Subject: Updated require for AMo move --- activerecord/lib/active_record/serializers/json_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/serializers/json_serializer.rb b/activerecord/lib/active_record/serializers/json_serializer.rb index e49cf59494..21afcd6e5c 100644 --- a/activerecord/lib/active_record/serializers/json_serializer.rb +++ b/activerecord/lib/active_record/serializers/json_serializer.rb @@ -1,5 +1,5 @@ require 'active_support/json' -require 'active_support/core_ext/module/model_naming' +require 'active_model/naming' module ActiveRecord #:nodoc: module Serialization -- cgit v1.2.3 From d5d59230f4d8f0457fc793446a3dbcdce0057a78 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 17 Jun 2009 20:19:21 -0500 Subject: Simplify AMo validation attribute reader --- activerecord/lib/active_record/validations.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index a150ba4acf..7ac6f6fe3b 100644 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -194,10 +194,6 @@ module ActiveRecord def errors @errors ||= Errors.new(self) end - - def get_attribute_value(attribute) - respond_to?(attribute.to_sym) ? send(attribute.to_sym) : self[attribute.to_sym] - end end end end -- cgit v1.2.3