aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/has_one_association.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-05-30 21:40:55 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-05-30 21:40:55 +0000
commit1edd21bb0288526fc3a79ac1f960f4d5e6e6a2f5 (patch)
tree4f15d8d015fca33dafb9e6ebc342262bfe749afc /activerecord/lib/active_record/associations/has_one_association.rb
parent962b12fb9f067dac6a5b0d440237628d0e1f2141 (diff)
downloadrails-1edd21bb0288526fc3a79ac1f960f4d5e6e6a2f5.tar.gz
rails-1edd21bb0288526fc3a79ac1f960f4d5e6e6a2f5.tar.bz2
rails-1edd21bb0288526fc3a79ac1f960f4d5e6e6a2f5.zip
with_scope is protected. Closes #8524.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/associations/has_one_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/has_one_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb
index b18169ab67..59e5486ad6 100644
--- a/activerecord/lib/active_record/associations/has_one_association.rb
+++ b/activerecord/lib/active_record/associations/has_one_association.rb
@@ -80,7 +80,7 @@ module ActiveRecord
# instance. Otherwise, if the target has not previously been loaded
# elsewhere, the instance we create will get orphaned.
load_target if replace_existing
- record = @reflection.klass.with_scope(:create => construct_scope[:create]) { yield @reflection.klass }
+ record = @reflection.klass.send(:with_scope, :create => construct_scope[:create]) { yield @reflection.klass }
if replace_existing
replace(record, true)