17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/controllers/admin/logs_controller.rb', line 17
def show
@log = Effective::Log.includes(:logs).find(params[:id])
@log.next_log = Effective::Log.order(:id).where(parent_id: @log.parent_id).where('id > ?', @log.id).first
@log.prev_log = Effective::Log.order(:id).where(parent_id: @log.parent_id).where('id < ?', @log.id).last
@page_title = "Log ##{@log.to_param}"
if @log.logs.present?
@log.datatable = EffectiveLogsDatatable.new(self, log_id: @log.id)
end
EffectiveLogging.authorize!(self, :show, @log)
EffectiveLogging.authorize!(self, :admin, :effective_logging)
end
|