Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 b466486
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 40 deletions.
4 changes: 4 additions & 0 deletions activerecord/CHANGELOG.md
@@ -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.

Expand Down
2 changes: 0 additions & 2 deletions activerecord/lib/active_record/relation/predicate_builder.rb
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions activerecord/test/cases/relations_test.rb
Expand Up @@ -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])
Expand Down

0 comments on commit b466486

Please sign in to comment.