module KakurenboPuti::ActiveRecordBase
Extension module of ActiveRecord::Base
Public Instance Methods
soft_deletable(column: :soft_destroyed_at, dependent_associations: [])
click to toggle source
Enable soft-delete. @raise [StandardException] if Not found soft-deleted date column.
@param [Symbol] column Name of soft-deleted date column. @param [Array<Symbol>] dependent_associations Names of dependency association.
# File lib/kakurenbo_puti/active_record_base.rb, line 9 def soft_deletable(column: :soft_destroyed_at, dependent_associations: []) Initializers.create_callbacks self Initializers.create_column_name_accessors self, column Initializers.create_scopes self, dependent_associations include InstanceMethods extend ClassMethods end