Class: Hyrax::Admin::PermissionTemplateAccessesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/hyrax/admin/permission_template_accesses_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/hyrax/admin/permission_template_accesses_controller.rb', line 7

def destroy
  authorize! :destroy, @permission_template_access
  ActiveRecord::Base.transaction do
    @permission_template_access.destroy
    remove_access!
  end
  if @permission_template_access.destroyed?
    after_destroy_success
  else
    after_destroy_error
  end
end