Skip to content

Commit 23130ab

Browse files
committed
renamed audit_log to audit_logs to match naming convention (see error_reports)
1 parent 16cdecc commit 23130ab

7 files changed

Lines changed: 10 additions & 10 deletions

File tree

app/controllers/admin_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def send_all_email
100100
redirect_to admin_path
101101
end
102102

103-
def audit_log
103+
def audit_logs
104104
@page = helpers.safe_page(params)
105105
@per_page = helpers.safe_per_page(params)
106106

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<h1><%= t 'admin.tools.audit_log' %></h1>
1+
<h1><%= t 'admin.tools.audit_logs' %></h1>
22

33
<div>
44
<h3>Filters</h3>
5-
<%= form_tag audit_log_path, method: :get, class: 'form-inline audit-log-filters' do %>
5+
<%= form_tag audit_logs_path, method: :get, class: 'form-inline audit-log-filters' do %>
66
<div class="form-group-horizontal">
77
<div class="form-group">
88
<%= label_tag :log_type, 'Log category', class: 'form-element' %>

app/views/admin/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
<div class="widget">
116116
<div class="widget--body">
117117
<i class="fas fa-user-secret"></i>
118-
<%= link_to t('admin.tools.audit_log'), audit_log_path, 'data-ckb-item-link' => '' %>
118+
<%= link_to t('admin.tools.audit_logs'), audit_logs_path, 'data-ckb-item-link' => '' %>
119119
</div>
120120
</div>
121121
</div>

config/locales/strings/en.admin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ en:
3333
privileges: 'Privileges'
3434
close_reasons: 'Close Reasons'
3535
licenses: 'Licenses'
36-
audit_log: 'Audit Log'
36+
audit_logs: 'Audit Log'
3737
post_types: 'Post Types'
3838
email_query: 'User Lookup by Email'
3939
user_fed_stat: 'User fed to STAT.'

config/locales/strings/es.admin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ es:
3030
privileges: 'Privilegios'
3131
close_reasons: 'Razones para Cerrar'
3232
licenses: 'Licencias'
33-
audit_log: 'Registro de Auditoría'
33+
audit_logs: 'Registro de Auditoría'
3434
post_types: 'Tipos de Publicación'
3535
user_fed_stat: 'STAT alimentado con usuario/a.'

config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
get 'email-all', to: 'admin#all_email', as: :email_all
4646
post 'email-all', to: 'admin#send_all_email', as: :send_all_email
4747

48-
get 'audits', to: 'admin#audit_log', as: :audit_log
48+
get 'audits', to: 'admin#audit_logs', as: :audit_logs
4949

5050
get 'new-site', to: 'admin#new_site', as: :new_site
5151
post 'new-site', to: 'admin#create_site', as: :create_site

test/controllers/admin_controller_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class AdminControllerTest < ActionController::TestCase
44
include Devise::Test::ControllerHelpers
55

6-
PARAM_LESS_ACTIONS = [:index, :error_reports, :privileges, :audit_log, :email_query, :admin_email, :all_email].freeze
6+
PARAM_LESS_ACTIONS = [:index, :error_reports, :privileges, :audit_logs, :email_query, :admin_email, :all_email].freeze
77

88
test 'should get index' do
99
sign_in users(:admin)
@@ -127,7 +127,7 @@ class AdminControllerTest < ActionController::TestCase
127127

128128
test 'should get audit log' do
129129
sign_in users(:admin)
130-
get :audit_log
130+
get :audit_logs
131131
assert_response(:success)
132132
assert_not_nil assigns(:logs)
133133
end
@@ -174,7 +174,7 @@ class AdminControllerTest < ActionController::TestCase
174174

175175
test 'audit log should work with filter params' do
176176
sign_in users(:admin)
177-
get :audit_log, params: { log_type: 'admin_audit', event_type: 'setting_update', from: '2025-04-13',
177+
get :audit_logs, params: { log_type: 'admin_audit', event_type: 'setting_update', from: '2025-04-13',
178178
to: '2025-04-13' }
179179
assert_response(:success)
180180
assert_not_nil assigns(:logs)

0 commit comments

Comments
 (0)