diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-21 15:23:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-21 15:25:09 -0700 |
commit | 50041e563a6a6e7ebe234c542935fb6fce4935e8 (patch) | |
tree | 79ae9e6f6d4d4e5348506fd4928f5d2a454f46d4 | |
parent | fdd537e7f929f46a56d81a7a8a037489cd2e68fb (diff) | |
download | rails-50041e563a6a6e7ebe234c542935fb6fce4935e8.tar.gz rails-50041e563a6a6e7ebe234c542935fb6fce4935e8.tar.bz2 rails-50041e563a6a6e7ebe234c542935fb6fce4935e8.zip |
this reject can be replaced with compact
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index ae822c3080..79f8ce346d 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -2243,7 +2243,7 @@ module ActiveRecord end [ - [parent_table[parent.primary_key].eq(join_table[jt_foreign_key]), jt_as_extra, jt_source_extra, jt_sti_extra].reject{|x| x.blank? }, + [parent_table[parent.primary_key].eq(join_table[jt_foreign_key]), jt_as_extra, jt_source_extra, jt_sti_extra].compact, aliased_table[first_key].eq(join_table[second_key]) ] elsif reflection.options[:as] |