<%= list_index_no((params[:page] || 1).to_i, index) %> |
<%= action.action_name %> |
diff --git a/app/views/admins/user_actions/index.html.erb b/app/views/admins/user_actions/index.html.erb
index 8821a8be0..bf052b146 100644
--- a/app/views/admins/user_actions/index.html.erb
+++ b/app/views/admins/user_actions/index.html.erb
@@ -13,24 +13,7 @@
<% end %>
-
-
-
-
-
- <%# @user_nps_mid = @score_total_count % 2 == 0 ? @score_total_count / 2 : (@score_total_count + 1) / 2 %>
-
-
-
-
-
-
-
-
-
-
-
-
+
<%= render partial: 'admins/user_actions/user_action_list', locals: { user_actions: @user_actions } %>
diff --git a/db/migrate/202410926031029_add_user_info_to_user_actions.rb b/db/migrate/202410926031029_add_user_info_to_user_actions.rb
index e361d2b1d..967e8a68d 100644
--- a/db/migrate/202410926031029_add_user_info_to_user_actions.rb
+++ b/db/migrate/202410926031029_add_user_info_to_user_actions.rb
@@ -7,14 +7,14 @@ class AddUserInfoToUserActions < ActiveRecord::Migration[5.2]
UserAction.find_in_batches(batch_size: 1000) do |sw|
Parallel.each(sw, in_threads: 5) do |user_action|
- next if user_action.user_id.blank?
- user = User.find_by(id: user_action.user_id)
- next if user.blank?
- user_action.login = user.login
- user_action.email = user.mail
- user_action.phone = user.phone
- user_action.save
+ if user_action.user.present?
+ user_action.login = user_action.user&.login
+ user_action.email = user_action.user&.mail
+ user_action.phone = user_action.user&.phone
+ user_action.save
+ end
end
end
end
+
end
|