17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/controllers/admin/logs_controller.rb', line 17
def show
@log = Effective::Log.includes(:logs).find(params[:id])
@log.next_log = Effective::Log.unscoped.order(:id).where(:parent_id => @log.parent_id).where('id > ?', @log.id).first
@log.prev_log = Effective::Log.unscoped.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 = Effective::Datatables::Logs.new(:log_id => @log.id) if defined?(EffectiveDatatables)
end
EffectiveLogging.authorized?(self, :show, @log)
end
|