Module: SoftDestroyable::SingletonMethods

Defined in:
lib/soft_destroyable.rb

Instance Method Summary collapse

Instance Method Details

#restrict_dependenciesObject



66
67
68
# File 'lib/soft_destroyable.rb', line 66

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!



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

def soft_dependencies
  has_one_dependencies + has_many_dependencies
end