Class: Admin::TrashController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



9
10
11
12
13
14
15
16
# File 'app/controllers/admin/trash_controller.rb', line 9

def index
  @datatable = EffectiveTrashDatatable.new(self)

  @page_title = 'Trash'

  EffectiveResources.authorize!(self, :index, Effective::Trash)
  EffectiveResources.authorize!(self, :admin, :effective_trash)
end

#showObject



18
19
20
21
22
23
24
# File 'app/controllers/admin/trash_controller.rb', line 18

def show
  @trash = Effective::Trash.all.find(params[:id])
  @page_title = "Trash item - #{@trash.trashed_to_s}"

  EffectiveResources.authorize!(self, :show, @trash)
  EffectiveResources.authorize!(self, :admin, :effective_trash)
end