Skip to content
Permalink
Browse files

Remove deprecated support to passing a class as a value in a query

  • Loading branch information
rafaelfranca committed Dec 29, 2016
1 parent 931b4b4 commit b4664864c972463c7437ad983832d2582186e886
@@ -1,3 +1,7 @@
* Remove deprecated support to passing a class as a value in a query.

*Rafael Mendonça França*

* Raises `ActiveRecord::IrreversibleOrderError` when using `last` with an irreversible
order.

@@ -4,7 +4,6 @@ class PredicateBuilder # :nodoc:
require "active_record/relation/predicate_builder/association_query_handler"
require "active_record/relation/predicate_builder/base_handler"
require "active_record/relation/predicate_builder/basic_object_handler"
require "active_record/relation/predicate_builder/class_handler"
require "active_record/relation/predicate_builder/polymorphic_array_handler"
require "active_record/relation/predicate_builder/range_handler"
require "active_record/relation/predicate_builder/relation_handler"
@@ -16,7 +15,6 @@ def initialize(table)
@handlers = []

register_handler(BasicObject, BasicObjectHandler.new)
register_handler(Class, ClassHandler.new(self))
register_handler(Base, BaseHandler.new(self))
register_handler(Range, RangeHandler.new)
register_handler(RangeHandler::RangeWithBinds, RangeHandler.new)

This file was deleted.

@@ -840,15 +840,6 @@ def test_find_with_list_of_ar
assert_equal author, authors.first
end

class Mary < Author; end

def test_find_by_classname
Author.create!(name: Mary.name)
assert_deprecated do
assert_equal 1, Author.where(name: Mary).size
end
end

def test_find_by_id_with_list_of_ar
author = Author.first
authors = Author.find_by_id([author])

0 comments on commit b466486

Please sign in to comment.
You can’t perform that action at this time.