diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2018-06-26 11:53:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2018-06-26 11:53:59 -0700 |
commit | 1cec4e1bbaba786aa4ea70a0e2b6ad6f15ec1e68 (patch) | |
tree | 029f66b5df0bfd3af12ea5209f13a81bd5b2c51b | |
parent | a01de4deab59f57874965a69e9a4c83112b3cb47 (diff) | |
download | rails-1cec4e1bbaba786aa4ea70a0e2b6ad6f15ec1e68.tar.gz rails-1cec4e1bbaba786aa4ea70a0e2b6ad6f15ec1e68.tar.bz2 rails-1cec4e1bbaba786aa4ea70a0e2b6ad6f15ec1e68.zip |
Fix documentation based on feedback
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 8 | ||||
-rw-r--r-- | activerecord/lib/active_record/result.rb | 2 |
2 files changed, 7 insertions, 3 deletions
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 |