Class: Audited::Ui::AuditsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/audited/ui/audits_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
# File 'app/controllers/audited/ui/audits_controller.rb', line 8

def index
  @q = @audits.ransack params[:q]
  @q.sorts = "created_at desc" if @q.sorts.none?
  @audits = @q.result(distinct: true).includes(:auditable, :user).page params[:page]
end