From 1cec4e1bbaba786aa4ea70a0e2b6ad6f15ec1e68 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 26 Jun 2018 11:53:59 -0700 Subject: Fix documentation based on feedback --- activerecord/lib/active_record/persistence.rb | 8 ++++++-- activerecord/lib/active_record/result.rb | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 72d92ef504..155d67fd8f 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -70,8 +70,12 @@ module ActiveRecord instantiate_instance_of(klass, attributes, column_types, &block) end - # Given a class, an attributes hash, +instantiate+ returns a new instance - # of the class. Accepts only keys as strings. + # Given a class, an attributes hash, +instantiate_instance_of+ returns a + # new instance of the class. Accepts only keys as strings. + # + # This is private, don't call it. :) + # + # :nodoc: def instantiate_instance_of(klass, attributes, column_types = {}, &block) attributes = klass.attributes_builder.build_from_database(attributes, column_types) klass.allocate.init_from_db(attributes, &block) diff --git a/activerecord/lib/active_record/result.rb b/activerecord/lib/active_record/result.rb index 3549e8a3fa..7f1c2fd7eb 100644 --- a/activerecord/lib/active_record/result.rb +++ b/activerecord/lib/active_record/result.rb @@ -43,7 +43,7 @@ module ActiveRecord @column_types = column_types end - # Does this result set include the column named +name+ ? + # Returns true if this result set includes the column named +name+ def includes_column?(name) @columns.include? name end -- cgit v1.2.3