Module: SimpleCrudify::CrudActions::Destroy Private

Defined in:
lib/simple_crudify/crud_actions.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#destroyObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



74
75
76
77
78
79
# File 'lib/simple_crudify/crud_actions.rb', line 74

def destroy
  @resource = ResourceHelper.resource(model_klass, params[:id])
  @resource.destroy

  redirect_to after_destroy_path, notice: controller_notice(action_name)
end