fixed: 未分类处理
This commit is contained in:
		
							parent
							
								
									71a8d67515
								
							
						
					
					
						commit
						e3d21199f5
					
				| 
						 | 
				
			
			@ -7,7 +7,7 @@ class Action::NodesController < ApplicationController
 | 
			
		|||
    @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(where(action_node_types_id: no_node_type.id)) if no_node_type.present?
 | 
			
		||||
    @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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue