mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 23:06:05 +01:00
remove trailing white spaces from lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@16878 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -94,10 +94,8 @@ module Redmine
|
|||||||
options[:limit]
|
options[:limit]
|
||||||
)
|
)
|
||||||
queries += 1
|
queries += 1
|
||||||
|
|
||||||
if !options[:titles_only] && searchable_options[:search_custom_fields]
|
if !options[:titles_only] && searchable_options[:search_custom_fields]
|
||||||
searchable_custom_fields = CustomField.where(:type => "#{self.name}CustomField", :searchable => true).to_a
|
searchable_custom_fields = CustomField.where(:type => "#{self.name}CustomField", :searchable => true).to_a
|
||||||
|
|
||||||
if searchable_custom_fields.any?
|
if searchable_custom_fields.any?
|
||||||
fields_by_visibility = searchable_custom_fields.group_by {|field|
|
fields_by_visibility = searchable_custom_fields.group_by {|field|
|
||||||
field.visibility_by_project_condition(searchable_options[:project_key], user, "#{CustomValue.table_name}.custom_field_id")
|
field.visibility_by_project_condition(searchable_options[:project_key], user, "#{CustomValue.table_name}.custom_field_id")
|
||||||
@@ -107,7 +105,6 @@ module Redmine
|
|||||||
clauses << "(#{CustomValue.table_name}.custom_field_id IN (#{fields.map(&:id).join(',')}) AND (#{visibility}))"
|
clauses << "(#{CustomValue.table_name}.custom_field_id IN (#{fields.map(&:id).join(',')}) AND (#{visibility}))"
|
||||||
end
|
end
|
||||||
visibility = clauses.join(' OR ')
|
visibility = clauses.join(' OR ')
|
||||||
|
|
||||||
r |= fetch_ranks_and_ids(
|
r |= fetch_ranks_and_ids(
|
||||||
search_scope(user, projects, options).
|
search_scope(user, projects, options).
|
||||||
joins(:custom_values).
|
joins(:custom_values).
|
||||||
|
|||||||
Reference in New Issue
Block a user