aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-02-22 18:44:14 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-02-22 18:44:14 +0000
commitc7d6d68f91f2cd2e04c2113cba44bef86dbad99f (patch)
treef9c4a03d7254d648718e671c4619f8637235b428 /activerecord/lib/active_record/reflection.rb
parentde54db3c1e2056322450e46c265b27792e99b2c7 (diff)
downloadrails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.tar.gz
rails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.tar.bz2
rails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.zip
Reflections don't attempt to resolve module nesting of association classes. Simplify type computation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r--activerecord/lib/active_record/reflection.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 9bac82f5ce..2f73300abf 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -136,13 +136,12 @@ module ActiveRecord
name
else
if options[:class_name]
- class_name = options[:class_name]
+ options[:class_name]
else
class_name = name.to_s.camelize
class_name = class_name.singularize if [ :has_many, :has_and_belongs_to_many ].include?(macro)
+ class_name
end
-
- active_record.send(:type_name_with_module, class_name)
end
end
end