Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop

This commit is contained in:
2025-01-17 14:01:15 +08:00
2 changed files with 5 additions and 3 deletions

View File

@@ -5,7 +5,9 @@ class Action::NodesController < ApplicationController
def index
@node_types = Action::NodeType.all
no_node_type = Action::NodeType.find_by(name: "未分类")
@no_type_nodes = Action::Node.where(action_node_types_id: nil)
@no_type_nodes = Action::Node.where(action_node_types_id: nil).or(Action::Node.where(action_node_types_id: no_node_type.id)) if no_node_type.present?
respond_to do |format|
format.html { @nodes = Action::Node.where("name LIKE :search OR full_name LIKE :search", :search => "%#{params[:search]}%") }
format.json