From ed080863d5783b09cdc7aa397d3622e9b2eefc82 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 4 Feb 2006 06:11:42 +0000 Subject: Just go with Subclasses instead of OnlySubclasses git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 81791201b4..dd0c3e5c79 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -243,7 +243,7 @@ module ActiveRecord #:nodoc: # on to any new database connections made and which can be retrieved on both a class and instance level by calling +logger+. cattr_accessor :logger - include Reloadable::OnlySubclasses + include Reloadable::Subclasses def self.inherited(child) #:nodoc: @@subclasses[self] ||= [] @@ -439,9 +439,7 @@ module ActiveRecord #:nodoc: attributes.collect { |attr| create(attr) } else object = new(attributes) - if scoped?(:create) - scope(:create).each { |att,value| object.send("#{att}=", value) } - end + scope(:create).each { |att,value| object.send("#{att}=", value) } if scoped?(:create) object.save object end -- cgit v1.2.3