diff options
author | ThibG <thib@sitedethib.com> | 2020-04-05 00:16:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 00:16:23 +0200 |
commit | 6e426267a762f3cd1efa2c5fb120a13543567775 (patch) | |
tree | 2a71acb5433eece834df66c179e924eb34df38fb /app/controllers | |
parent | 5c5317041f17375666bfaf4788f0adf71804b47d (diff) | |
parent | ec6464f8d0bba52e3bfb8f0afc9531ce80238000 (diff) |
Merge pull request #1311 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/action_logs_controller.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/controllers/admin/action_logs_controller.rb b/app/controllers/admin/action_logs_controller.rb index e273dfeae..2d77620df 100644 --- a/app/controllers/admin/action_logs_controller.rb +++ b/app/controllers/admin/action_logs_controller.rb @@ -2,8 +2,18 @@ module Admin class ActionLogsController < BaseController - def index - @action_logs = Admin::ActionLog.page(params[:page]) + before_action :set_action_logs + + def index; end + + private + + def set_action_logs + @action_logs = Admin::ActionLogFilter.new(filter_params).results.page(params[:page]) + end + + def filter_params + params.slice(:page, *Admin::ActionLogFilter::KEYS).permit(:page, *Admin::ActionLogFilter::KEYS) end end end |