diff options
author | rick <technoweenie@gmail.com> | 2008-07-16 14:20:15 -0700 |
---|---|---|
committer | rick <technoweenie@gmail.com> | 2008-07-16 14:20:15 -0700 |
commit | 0a6d75dedd79407376aae1f01302164dfd3e44b6 (patch) | |
tree | dfef7e73b3b19a65895651c82cb6e0b727394eab /activerecord/lib/active_record/named_scope.rb | |
parent | a14cedc7797aef4ccd9da46ed73e36d730392814 (diff) | |
parent | fc89a951933638b051bb1f9e1339ee6ae7c94cda (diff) | |
download | rails-0a6d75dedd79407376aae1f01302164dfd3e44b6.tar.gz rails-0a6d75dedd79407376aae1f01302164dfd3e44b6.tar.bz2 rails-0a6d75dedd79407376aae1f01302164dfd3e44b6.zip |
merge with local tweaks
Diffstat (limited to 'activerecord/lib/active_record/named_scope.rb')
-rw-r--r-- | activerecord/lib/active_record/named_scope.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb index eac61e9e43..080e3d0f5e 100644 --- a/activerecord/lib/active_record/named_scope.rb +++ b/activerecord/lib/active_record/named_scope.rb @@ -150,7 +150,8 @@ module ActiveRecord if scopes.include?(method) scopes[method].call(self, *args) else - with_scope :find => proxy_options do + with_scope :find => proxy_options, :create => proxy_options[:conditions].is_a?(Hash) ? proxy_options[:conditions] : {} do + method = :new if method == :build proxy_scope.send(method, *args, &block) end end |