diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-30 15:48:15 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-30 15:48:15 -0800 |
commit | ae6033331fe78cf5b3af04e1f6f930b98ddab66f (patch) | |
tree | 7accd8b1bb016e2a77e91f9f28aeb41683ace9af | |
parent | b293ab7c618f65e06371e9ae7b00fe2a65082209 (diff) | |
download | rails-ae6033331fe78cf5b3af04e1f6f930b98ddab66f.tar.gz rails-ae6033331fe78cf5b3af04e1f6f930b98ddab66f.tar.bz2 rails-ae6033331fe78cf5b3af04e1f6f930b98ddab66f.zip |
shorten up scope_for_create
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 4bc7f73013..8d0d99a125 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -327,13 +327,7 @@ module ActiveRecord end def scope_for_create - @scope_for_create ||= begin - if @create_with_value - where_values_hash.merge @create_with_value - else - where_values_hash - end - end + @scope_for_create ||= where_values_hash.merge(@create_with_value || {}) end def eager_loading? |