diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-29 14:43:19 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-29 17:53:04 -0500 |
commit | b4664864c972463c7437ad983832d2582186e886 (patch) | |
tree | 26e8023ad44724e53d0427a4c5143c04738366e2 /activerecord/lib/active_record/relation/predicate_builder | |
parent | 931b4b4d64f9b4ea49589aeceed121dea57231c5 (diff) | |
download | rails-b4664864c972463c7437ad983832d2582186e886.tar.gz rails-b4664864c972463c7437ad983832d2582186e886.tar.bz2 rails-b4664864c972463c7437ad983832d2582186e886.zip |
Remove deprecated support to passing a class as a value in a query
Diffstat (limited to 'activerecord/lib/active_record/relation/predicate_builder')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder/class_handler.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder/class_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/class_handler.rb deleted file mode 100644 index 810937ead6..0000000000 --- a/activerecord/lib/active_record/relation/predicate_builder/class_handler.rb +++ /dev/null @@ -1,29 +0,0 @@ -module ActiveRecord - class PredicateBuilder - class ClassHandler # :nodoc: - def initialize(predicate_builder) - @predicate_builder = predicate_builder - end - - def call(attribute, value) - print_deprecation_warning - predicate_builder.build(attribute, value.name) - end - - # TODO Change this to private once we've dropped Ruby 2.2 support. - # Workaround for Ruby 2.2 "private attribute?" warning. - protected - - attr_reader :predicate_builder - - private - - def print_deprecation_warning - ActiveSupport::Deprecation.warn(<<-MSG.squish) - Passing a class as a value in an Active Record query is deprecated and - will be removed. Pass a string instead. - MSG - end - end - end -end |