From fd7ca6ebca354e8509c4ec32bd343ab0aa511452 Mon Sep 17 00:00:00 2001
From: Ryuta Kamizono <kamipo@gmail.com>
Date: Mon, 14 Nov 2016 11:28:39 +0900
Subject: Call `spawn` and bang method for `none`

All query methods calls `spawn` and bang method, but only `none` is not.
---
 activerecord/lib/active_record/relation/query_methods.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'activerecord')

diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 2a0dd1c10f..5f5d8ceea3 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -763,7 +763,7 @@ module ActiveRecord
     #   end
     #
     def none
-      where("1=0").extending!(NullRelation)
+      spawn.none!
     end
 
     def none! # :nodoc:
-- 
cgit v1.2.3