Module: HasModerated::ModeratedDestroy::InstanceMethods

Defined in:
lib/has_moderated/moderated_destroy.rb

Instance Method Summary collapse

Instance Method Details

#destroy_with_moderation(*args) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/has_moderated/moderated_destroy.rb', line 26

def destroy_with_moderation *args
  if self.moderation_disabled
    destroy_without_moderation *args
  else
    to_moderation_destroyed
    true
  end
end

#to_moderation_destroyedObject



35
36
37
# File 'lib/has_moderated/moderated_destroy.rb', line 35

def to_moderation_destroyed
  create_moderation_with_hooks!(:destroy => true)
end