Class: EducodeSales::Business
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- EducodeSales::Business
- Defined in:
- app/models/educode_sales/business.rb
Instance Method Summary collapse
Instance Method Details
#soft_destroy(user_id) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/models/educode_sales/business.rb', line 14 def soft_destroy(user_id) self.update(deleted_at: Time.now) self.sale_plans.each do |d| d.soft_destroy(user_id) end self.follow_ups.update_all(deleted_at: Time.now) EducodeSales::Recycle.create(source: self, deleter_id: user_id) end |