]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3529 Fix for property sets
authorDavid Gageot <david@gageot.net>
Mon, 8 Oct 2012 16:16:21 +0000 (18:16 +0200)
committerDavid Gageot <david@gageot.net>
Mon, 8 Oct 2012 16:16:30 +0000 (18:16 +0200)
sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/models/property.rb

index 1b7c36b12e85722c52c4936c18dc108a67924c92..1ddd6320627ab38c7862e5fd6aee22239668f0fa 100644 (file)
@@ -57,7 +57,7 @@ module SettingsHelper
   end
 
   def property_value(property)
-    if property.multi_values
+    if property.multi_values?
       Property.values(property.key, @resource ? @resource.id : nil)
     else
       Property.value(property.key, @resource ? @resource.id : nil, '')
@@ -87,7 +87,7 @@ module SettingsHelper
 
   def input_name(property)
     name = "settings[#{h property.key}]"
-    if property.multi_values
+    if property.multi_values?
       name += '[]'
     end
     name
index ddcb556c65ff99a12c594507efdd87fa027702da..cff720bfc3f86a07b21740f4c7530e900eae6e48 100644 (file)
@@ -126,7 +126,7 @@ class Property < ActiveRecord::Base
   end
 
   def multi_values?
-    (java_definition && (java_definition.multi_values || !java_definition.fields.blank?)) || (java_field_definition && java_field_definition.multi_values)
+    java_definition && (java_definition.isMultiValues() || !java_definition.fields.blank?)
   end
 
   def to_xml(xml=Builder::XmlMarkup.new(:indent => 0))