diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-12-20 22:14:05 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-12-20 22:14:05 +0100 |
commit | 80aa43c18b285506b5f2d687a3d5fe7afec00508 (patch) | |
tree | 0fcc9d5a45bb0927023258b9bcf1ecc7bd099b73 | |
parent | 611b1f59aceedff811c5a94427b622c44ad66e0e (diff) | |
download | sonarqube-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.rb | 4 |
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 |