diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-21 14:08:23 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-21 14:08:23 -0700 |
commit | 474ebc55bd13ad58626a49dfc44c8e6407813935 (patch) | |
tree | fd83010245387d3294b01e4b799b418c3f96f447 /activerecord/lib | |
parent | 68a97e81187358ae8a4d59499d9afc2f09d35d24 (diff) | |
download | rails-474ebc55bd13ad58626a49dfc44c8e6407813935.tar.gz rails-474ebc55bd13ad58626a49dfc44c8e6407813935.tar.bz2 rails-474ebc55bd13ad58626a49dfc44c8e6407813935.zip |
adding set_binds
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 6516c4be5c..52936817f8 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -470,6 +470,14 @@ module ActiveRecord load end + def set_binds(list) + @loaded = nil + @records = [] + list.zip(values[:bind]).each do |val, bv| + bv[1] = val + end + end + def reset @first = @last = @to_sql = @order_clause = @scope_for_create = @arel = @loaded = nil @should_eager_load = @join_dependency = nil |