Module: SoftDestroyable::SingletonMethods

Defined in:
lib/soft_destroyable.rb

Instance Method Summary collapse

Instance Method Details

#restrict_dependenciesObject



63
64
65
# File 'lib/soft_destroyable.rb', line 63

def restrict_dependencies
  with_restrict_option(:has_many).map(&:name) + with_restrict_option(:has_one).map(&:name)
end

#soft_dependenciesObject

returns an array of association symbols that must be managed by soft_destroyable on destroy and destroy!



59
60
61
# File 'lib/soft_destroyable.rb', line 59

def soft_dependencies
  has_many_dependencies + has_one_dependencies
end