Module Cms::Behaviors::SoftDeleting::MacroMethods
In: lib/cms/behaviors/soft_deleting.rb

Methods

Included Modules

InstanceMethods

External Aliases

find -> find_with_deleted
count -> count_with_deleted
delete_all -> delete_all!

Public Instance methods

[Source]

    # File lib/cms/behaviors/soft_deleting.rb, line 11
11:         def uses_soft_delete(options={})
12:           @uses_soft_delete = true
13:         
14:           named_scope :not_deleted, :conditions => ["#{table_name}.deleted = ?", false]
15:           class << self
16:             alias_method :find_with_deleted, :find
17:             alias_method :count_with_deleted, :count
18:             alias_method :delete_all!, :delete_all
19:           end
20:           alias_method :destroy_without_callbacks!, :destroy_without_callbacks
21:         
22:           extend ClassMethods
23:           include InstanceMethods
24:         end

[Source]

    # File lib/cms/behaviors/soft_deleting.rb, line 8
 8:         def uses_soft_delete?
 9:           !!@uses_soft_delete
10:         end

[Validate]