修复:项目查询标签未返回全部
This commit is contained in:
		
							parent
							
								
									7f19972347
								
							
						
					
					
						commit
						46381e90d1
					
				| 
						 | 
					@ -6,8 +6,8 @@ module Matchable
 | 
				
			||||||
    scope :with_project_language, ->(language_id) { where(project_language_id: language_id) unless language_id.blank? }
 | 
					    scope :with_project_language, ->(language_id) { where(project_language_id: language_id) unless language_id.blank? }
 | 
				
			||||||
    scope :with_project_type,     ->(project_type) { where(project_type: project_type) if Project.project_types.include?(project_type) }
 | 
					    scope :with_project_type,     ->(project_type) { where(project_type: project_type) if Project.project_types.include?(project_type) }
 | 
				
			||||||
    scope :by_name_or_identifier, ->(search) { where("name like :search or identifier LIKE :search", :search => "%#{search.split(" ").join('|')}%") unless search.blank? }
 | 
					    scope :by_name_or_identifier, ->(search) { where("name like :search or identifier LIKE :search", :search => "%#{search.split(" ").join('|')}%") unless search.blank? }
 | 
				
			||||||
    scope :with_project_topic, ->(topic_id) {joins(:project_topics).where(project_topics: {id: topic_id}) unless topic_id.blank?}
 | 
					    scope :with_project_topic, ->(topic_id) {left_outer_joins(:project_topics).where(project_topics: {id: topic_id}) unless topic_id.blank?}
 | 
				
			||||||
    scope :with_project_topic_name, ->(topic_name) {joins(:project_topics).where(project_topics: {name: topic_name}) unless topic_name.blank?}
 | 
					    scope :with_project_topic_name, ->(topic_name) {left_outer_joins(:project_topics).where(project_topics: {name: topic_name}) unless topic_name.blank?}
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue