aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-02-04 06:11:42 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-02-04 06:11:42 +0000
commited080863d5783b09cdc7aa397d3622e9b2eefc82 (patch)
treea9482c69c04223362124b96014c8428c5204fa84 /activerecord/lib/active_record/base.rb
parenta6a683b0bb7c6019ed38b5d1bba1dac4594dc5da (diff)
downloadrails-ed080863d5783b09cdc7aa397d3622e9b2eefc82.tar.gz
rails-ed080863d5783b09cdc7aa397d3622e9b2eefc82.tar.bz2
rails-ed080863d5783b09cdc7aa397d3622e9b2eefc82.zip
Just go with Subclasses instead of OnlySubclasses
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb6
1 files changed, 2 insertions, 4 deletions
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