提交 e2a58b29 编写于 作者: N Noemj

Added :nodoc: for private methods

上级 9693df61
......@@ -39,7 +39,7 @@ def initialize_copy(other)
reset
end
def insert(values)
def insert(values) # :nodoc:
primary_key_value = nil
if primary_key && Hash === values
......@@ -73,7 +73,7 @@ def insert(values)
binds)
end
def update_record(values, id, id_was)
def update_record(values, id, id_was) # :nodoc:
substitutes, binds = substitute_values values
um = @klass.unscoped.where(@klass.arel_table[@klass.primary_key].eq(id_was || id)).arel.compile_update(substitutes)
......@@ -83,7 +83,7 @@ def update_record(values, id, id_was)
binds)
end
def substitute_values(values)
def substitute_values(values) # :nodoc:
substitutes = values.sort_by { |arel_attr,_| arel_attr.name }
binds = substitutes.map do |arel_attr, value|
[@klass.columns_hash[arel_attr.name], value]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册