diff options
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/property.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb index 397f70a7926..3d61493d36f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb @@ -188,7 +188,7 @@ class Profile < ActiveRecord::Base @projects ||= begin Project.find(:all, - :conditions => ['id in (select prop.resource_id from properties prop where prop.resource_id is not null and prop.prop_key=? and prop.text_value=?)', "sonar.profile.#{language}", name]) + :conditions => ['id in (select prop.resource_id from properties prop where prop.resource_id is not null and prop.prop_key=? and prop.text_value like ?)', "sonar.profile.#{language}", name]) end end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb index 6371b51242d..151657d11b0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb @@ -21,7 +21,7 @@ class Property < ActiveRecord::Base validates_presence_of :prop_key named_scope :with_key, lambda { |value| {:conditions => {:prop_key, value}} } - named_scope :with_value, lambda { |value| {:conditions => {:text_value, value}} } + named_scope :with_value, lambda { |value| {:conditions => ['text_value like ?', value] } } named_scope :with_resource, lambda { |value| {:conditions => {:resource_id => value}} } named_scope :with_user, lambda { |value| {:conditions => {:user_id => value}} } named_scope :with_resources, :conditions => 'resource_id is not null' |