提交 de55c8d7 编写于 作者: E Eloy Duran

Fixed some spelling errors in documentation about...

Fixed some spelling errors in documentation about AssociationCollection::destroy and AssociationCollection::destroy_all.

This time without the whitespace fixes and move of the destroy_all method.
上级 8e277f89
...@@ -143,6 +143,8 @@ def transaction(*args) ...@@ -143,6 +143,8 @@ def transaction(*args)
end end
# Remove all records from this association # Remove all records from this association
#
# See delete for more info.
def delete_all def delete_all
load_target load_target
delete(@target) delete(@target)
...@@ -200,11 +202,11 @@ def delete(*records) ...@@ -200,11 +202,11 @@ def delete(*records)
end end
end end
# Destroy +records+ and remove from this association calling +before_remove+ # Destroy +records+ and remove them from this association calling
# and +after_remove+ callbacks. # +before_remove+ and +after_remove+ callbacks.
# #
# Note this method will always remove records from database ignoring the # Note that this method will _always_ remove records from the database
# +:dependent+ option. # ignoring the +:dependent+ option.
def destroy(*records) def destroy(*records)
remove_records(records) do |records, old_records| remove_records(records) do |records, old_records|
old_records.each { |record| record.destroy } old_records.each { |record| record.destroy }
...@@ -226,7 +228,9 @@ def clear ...@@ -226,7 +228,9 @@ def clear
self self
end end
# Destory all the records from this association # Destory all the records from this association.
#
# See destroy for more info.
def destroy_all def destroy_all
load_target load_target
destroy(@target) destroy(@target)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册