mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix documentation based on feedback
This commit is contained in:
parent
a01de4deab
commit
1cec4e1bba
2 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue