修复:找不到type

This commit is contained in:
yystopf 2024-04-08 08:48:07 +08:00
parent baf2d03668
commit ce0f70c836
2 changed files with 3 additions and 2 deletions

View File

@ -231,7 +231,8 @@ class ProjectsController < ApplicationController
end
def user_actions
user_actions = UserAction.where(action_type: "ViewProject-#{@project.id}").includes(:user).merge(User.like(params[:search]))
user_actions = UserAction.where(action_type: "ViewProject-#{@project.id}").joins(:user)
user_actions = user_actions.merge(User.like(params[:search]))
@user_actions = kaminari_paginate(user_actions)
end

View File

@ -1,4 +1,4 @@
json.count @user_actions.total_count
json.total_count @user_actions.total_count
json.users do
json.partial! "/projects/list_user_secret", collection: @user_actions, as: :target
end