diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-23 23:54:35 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-24 11:08:16 +0000 |
commit | 1029c511f190fbcf4214fa89118bd7264ef9959c (patch) | |
tree | 5b805816c0b934aa857ad37f1300e720234667b3 /activerecord/lib/active_record | |
parent | 95795bcb2f3527d2b48a626e70e298a9665cfc66 (diff) | |
download | rails-1029c511f190fbcf4214fa89118bd7264ef9959c.tar.gz rails-1029c511f190fbcf4214fa89118bd7264ef9959c.tar.bz2 rails-1029c511f190fbcf4214fa89118bd7264ef9959c.zip |
Fix #exists? for AR::Model
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 3c8e0f2052..311bf4dc0f 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -187,7 +187,7 @@ module ActiveRecord def exists?(id = false) return false if id.nil? - id = id.id if ActiveRecord::Base === id + id = id.id if ActiveRecord::Model === id join_dependency = construct_join_dependency_for_association_find relation = construct_relation_for_association_find(join_dependency) |