Class: Usage
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Usage
- Defined in:
- app/models/usage.rb
Class Method Summary collapse
Methods inherited from ApplicationRecord
aggregate_of, all_except, defaults, #delete, #destroy!, numbered, organic_on, resource_fields, #save, #save_and_notify!, #save_and_notify_changes!, serialize_symbolized_hash_array, #update_and_notify!, update_or_create!, whitelist_attributes
Class Method Details
.destroy_usages_for(record) ⇒ Object
11 12 13 |
# File 'app/models/usage.rb', line 11 def self.destroy_usages_for(record) Usage.where(parent_item: record).destroy_all end |