diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-15 13:01:13 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-15 13:01:13 -0200 |
commit | da5e5c5f779355a2e99e63a90612cbeaeb0fc986 (patch) | |
tree | 216e24f855e84473808766d7a58d20c953b6a2d8 /activerecord/lib/active_record/relation/finder_methods.rb | |
parent | 823604ec1659109eedeb2db91de325d413c73452 (diff) | |
download | rails-da5e5c5f779355a2e99e63a90612cbeaeb0fc986.tar.gz rails-da5e5c5f779355a2e99e63a90612cbeaeb0fc986.tar.bz2 rails-da5e5c5f779355a2e99e63a90612cbeaeb0fc986.zip |
Revert "Merge pull request #7983 from georgebrock/bug7950-squashed"
This reverts commit 88a296dccc401da143d90cad54b693ff06bf2b58, reversing
changes made to 666a7e34f553cef4c8878362eafc79c7e3f310c3.
Conflicts:
activerecord/CHANGELOG.md
Reason: this has been resulting in some hard to track bugs and is
introducing a possible breackage in a stable version.
Diffstat (limited to 'activerecord/lib/active_record/relation/finder_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index cbb2f676c8..08cfe4f70d 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -199,7 +199,7 @@ module ActiveRecord relation = relation.where(table[primary_key].eq(id)) if id end - connection.select_value(relation, "#{name} Exists", relation.bind_values) ? true : false + connection.select_value(relation, "#{name} Exists") ? true : false rescue ThrowResult false end @@ -334,7 +334,7 @@ module ActiveRecord substitute = connection.substitute_at(column, @bind_values.length) relation = where(table[primary_key].eq(substitute)) - relation.bind_values += [[column, id]] + relation.bind_values = [[column, id]] record = relation.first unless record |