instance method
clear
Ruby on Rails 4.1.16
Since v4.0.13Signature
clear()
Equivalent to delete_all. The difference is that returns self, instead of an array with the deleted objects, so methods can be chained. See delete_all for more information.
Source
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 988
def clear
delete_all
self
end
Defined in activerecord/lib/active_record/associations/collection_proxy.rb line 988
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Associations::CollectionProxy