mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #10390 from Noemj/bind_param_handling
Added :nodoc: for relation.rb's private methods
This commit is contained in:
commit
2d03a7edd9
1 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ module ActiveRecord
|
|||
reset
|
||||
end
|
||||
|
||||
def insert(values)
|
||||
def insert(values) # :nodoc:
|
||||
primary_key_value = nil
|
||||
|
||||
if primary_key && Hash === values
|
||||
|
@ -73,7 +73,7 @@ module ActiveRecord
|
|||
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 @@ module ActiveRecord
|
|||
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]
|
||||
|
|
Loading…
Reference in a new issue