Skip to content
Browse files

Revert "Merge pull request #10539 from davidcelis/ar-sql-improvements"

This reverts commit 257fa68, reversing
changes made to 94725b8.

The build failed

https://travis-ci.org/rails/rails/builds/7883546
  • Loading branch information...
1 parent 257fa68 commit 2b763131eacaae5bff9ffb5015fbf367d594dc64 @jonleighton jonleighton committed Jun 7, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 activerecord/lib/active_record/relation.rb
View
6 activerecord/lib/active_record/relation.rb
@@ -21,7 +21,6 @@ class Relation
alias :model :klass
alias :loaded? :loaded
alias :default_scoped? :default_scoped
- alias :blank? :empty?
def initialize(klass, table, values = {})
@klass = klass
@@ -576,6 +575,11 @@ def with_default_scope #:nodoc:
end
end
+ # Returns true if relation is blank.
+ def blank?
+ to_a.blank?
+ end
+
def values
Hash[@values]
end

0 comments on commit 2b76313

Please sign in to comment.
Something went wrong with that request. Please try again.