Module: DestroyedAt::Resource

Defined in:
lib/destroyed_at/mapper.rb

Instance Method Summary collapse

Instance Method Details

#default_actionsObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/destroyed_at/mapper.rb', line 15

def default_actions
  actions = super
  class_name = self.singular.camelcase

  if Module.const_defined?(class_name) && class_name.constantize.included_modules.include?(DestroyedAt)
    actions << :restore
  end

  actions
end