diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-12 20:08:00 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-12 20:08:00 -0300 |
commit | 4aa89eda065eb8d1ed16df72804c15a1a41719fa (patch) | |
tree | 99d8071159e757b1713e4452c5639fdb4c6fcbeb /activerecord/lib | |
parent | b26224899734dd0193d85a542faf1e6f4a28ad14 (diff) | |
parent | 87a84d3263c8712f85e70c45803203fa54658a9e (diff) | |
download | rails-4aa89eda065eb8d1ed16df72804c15a1a41719fa.tar.gz rails-4aa89eda065eb8d1ed16df72804c15a1a41719fa.tar.bz2 rails-4aa89eda065eb8d1ed16df72804c15a1a41719fa.zip |
Merge pull request #12156 from rywall/from-copy-binds
Allow Relation#from to accept other relations with bind values.
Conflicts:
activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 1c6ea94c0b..9916c597ee 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -915,6 +915,7 @@ module ActiveRecord case opts when Relation name ||= 'subquery' + self.bind_values = opts.bind_values + self.bind_values opts.arel.as(name.to_s) else opts |