Method: ActiveRecord::Associations::CollectionProxy#clear
- Defined in:
- activerecord/lib/active_record/associations/collection_proxy.rb
#clear ⇒ Object
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. Note that because delete_all removes records by directly running an SQL query into the database, the updated_at column of the object is not changed.
1066 1067 1068 1069 |
# File 'activerecord/lib/active_record/associations/collection_proxy.rb', line 1066 def clear delete_all self end |