diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-01-14 17:34:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 17:34:44 -0500 |
commit | fcd38cf19fa6249d5b62bbe887fde6120408e9c3 (patch) | |
tree | c0297862df6c5d706c946799310c1f754ce959b1 /activerecord/lib | |
parent | 40da1c430bc2d8d5cd9a9349993fbdf62e68529f (diff) | |
parent | 74bef0970fff60eaf5faefde30a23f3c36c0b3ee (diff) | |
download | rails-fcd38cf19fa6249d5b62bbe887fde6120408e9c3.tar.gz rails-fcd38cf19fa6249d5b62bbe887fde6120408e9c3.tar.bz2 rails-fcd38cf19fa6249d5b62bbe887fde6120408e9c3.zip |
Merge pull request #34891 from gmcgibbon/ac_params_exists
Allow strong params in ActiveRecord::Base#exists?
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index dc03b196f4..fd84f9c46b 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -312,6 +312,8 @@ module ActiveRecord return false if !conditions || limit_value == 0 + conditions = sanitize_forbidden_attributes(conditions) + if eager_loading? relation = apply_join_dependency(eager_loading: false) return relation.exists?(conditions) |