lib/destroyed_at/mapper.rb in destroyed_at-0.4.0 vs lib/destroyed_at/mapper.rb in destroyed_at-1.0.0
- old
+ new
@@ -12,10 +12,10 @@
ActionDispatch::Routing::Mapper.send(:prepend, DestroyedAt::Routes)
module DestroyedAt::Resource
def default_actions
actions = super
- class_name = self.name.camelcase.singularize
+ class_name = self.singular.camelcase
if Module.const_defined?(class_name) && class_name.constantize.included_modules.include?(DestroyedAt)
actions << :restore
end