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


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

def destroy
  ActiveRecord::Base.transaction do
    @permission_template_access.destroy if valid_delete?
    remove_access!
  end

  if @permission_template_access.destroyed?
    after_destroy_success
  else
    after_destroy_error
  end
end