diff options
author | Cheah Chu Yeow <chuyeow@gmail.com> | 2008-06-26 10:21:53 +0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-09 10:42:30 -0700 |
commit | ce4a1bb8538bd7cc5ee3cbf1156dc587482a7839 (patch) | |
tree | 0730d2ed46c4dd77b5ed141d37e9e41952b5c68b /activerecord/lib/active_record/associations.rb | |
parent | 11252e35b1756b025d8778c151f9f9a24057d1b1 (diff) | |
download | rails-ce4a1bb8538bd7cc5ee3cbf1156dc587482a7839.tar.gz rails-ce4a1bb8538bd7cc5ee3cbf1156dc587482a7839.tar.bz2 rails-ce4a1bb8538bd7cc5ee3cbf1156dc587482a7839.zip |
Remove some Symbol#to_proc usage in runtime code. [#484 state:resolved]
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 856d872bce..6931744058 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1145,7 +1145,7 @@ module ActiveRecord end define_method("#{reflection.name.to_s.singularize}_ids") do - send(reflection.name).map(&:id) + send(reflection.name).map { |record| record.id } end end @@ -1490,7 +1490,7 @@ module ActiveRecord sql << " FROM #{connection.quote_table_name table_name} " if is_distinct - sql << distinct_join_associations.collect(&:association_join).join + sql << distinct_join_associations.collect { |assoc| assoc.association_join }.join add_joins!(sql, options, scope) end |