Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

improve NullRelation docs [ci skip]

  • Loading branch information...
commit 8fe5f01c31c489548f1648b1c3269c2d1cb5e178 1 parent c851def
@vijaydev vijaydev authored
View
1  activerecord/lib/active_record/null_relation.rb
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
module ActiveRecord
- # = Active Record Null Relation
module NullRelation # :nodoc:
def exec_queries
@records = []
View
8 activerecord/lib/active_record/relation/query_methods.rb
@@ -435,11 +435,11 @@ def lock!(locks = true)
end
# Returns a chainable relation with zero records, specifically an
- # instance of the NullRelation class.
+ # instance of the <tt>ActiveRecord::NullRelation</tt> class.
#
- # The returned NullRelation inherits from Relation and implements the
- # Null Object pattern so it is an object with defined null behavior:
- # it always returns an empty array of records and does not query the database.
+ # The returned <tt>ActiveRecord::NullRelation</tt> inherits from Relation and implements the
+ # Null Object pattern. It is an object with defined null behavior and always returns an empty
+ # array of records without quering the database.
#
# Any subsequent condition chained to the returned relation will continue
# generating an empty relation and will not fire any query to the database.

0 comments on commit 8fe5f01

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