aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/relation.rb')
-rw-r--r--activerecord/lib/active_record/relation.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index 6f39708ec3..b125449127 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -256,7 +256,7 @@ module ActiveRecord
# # Update all books with 'Rails' in their title
# Book.update_all "author = 'David'", "title LIKE '%Rails%'"
#
- # # Update all avatars migrated more than a week ago
+ # # Update all avatars migrated more recently than a week ago
# Avatar.update_all ['migrated_at = ?', Time.now.utc], ['migrated_at > ?', 1.week.ago]
#
# # Update all books that match conditions, but limit it to 5 ordered by date
@@ -507,6 +507,10 @@ module ActiveRecord
end
end
+ def blank?
+ to_a.blank?
+ end
+
private
def references_eager_loaded_tables?