Skip to content
Browse files

Fix typos and add nodocs to NullRelation

  • Loading branch information...
1 parent 2c050e1 commit 30bf42b3ef8be104abffba07c3feaa343d882e09 @oscardelben oscardelben committed
Showing with 4 additions and 4 deletions.
  1. +1 −1 activerecord/lib/active_record/null_relation.rb
  2. +3 −3 activerecord/lib/active_record/relation.rb
View
2 activerecord/lib/active_record/null_relation.rb
@@ -2,7 +2,7 @@
module ActiveRecord
# = Active Record Null Relation
- module NullRelation
+ module NullRelation # :nodoc:
def exec_queries
@records = []
end
View
6 activerecord/lib/active_record/relation.rb
@@ -490,9 +490,9 @@ def to_sql
@to_sql ||= klass.connection.to_sql(arel, bind_values.dup)
end
- # Returns an hash of where conditions
+ # Returns a hash of where conditions
#
- # Users.where(name: 'Oscar').to_sql
+ # Users.where(name: 'Oscar').where_values_hash
# # => {:name=>"oscar"}
def where_values_hash
equalities = with_default_scope.where_values.grep(Arel::Nodes::Equality).find_all { |node|
@@ -550,7 +550,7 @@ def with_default_scope #:nodoc:
end
end
- # Returns true if relation is blank>
+ # Returns true if relation is blank.
def blank?
to_a.blank?
end

0 comments on commit 30bf42b

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