aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-12-20 22:14:05 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-12-20 22:14:05 +0100
commit80aa43c18b285506b5f2d687a3d5fe7afec00508 (patch)
tree0fcc9d5a45bb0927023258b9bcf1ecc7bd099b73
parent611b1f59aceedff811c5a94427b622c44ad66e0e (diff)
downloadsonarqube-80aa43c18b285506b5f2d687a3d5fe7afec00508.tar.gz
sonarqube-80aa43c18b285506b5f2d687a3d5fe7afec00508.zip
Fix backward compatibility of the ruby method Widget#property_value
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb
index 839b4f39b0f..215efeae2e7 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb
@@ -47,9 +47,9 @@ class Widget < ActiveRecord::Base
prop ? prop.text_value : nil
end
- def property_value(key)
+ def property_value(key, default_value=nil)
prop=property(key)
- prop ? prop.value : nil
+ (prop ? prop.value : nil)||default_value
end
def properties_as_hash