From 90ec21f970fe1485e66508dfd661f3187db044a6 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 3 Sep 2013 10:17:57 +0200 Subject: [PATCH] Refactor Ruby "x ? x.y : nil" to "x && x.y", which is more readable. --- .../app/controllers/api/resources_controller.rb | 4 ++-- .../controllers/api/timemachine_controller.rb | 4 ++-- .../controllers/batch_bootstrap_controller.rb | 2 +- .../app/controllers/dashboard_controller.rb | 2 +- .../WEB-INF/app/controllers/issue_controller.rb | 4 ++-- .../WEB-INF/app/helpers/settings_helper.rb | 6 +++--- .../main/webapp/WEB-INF/app/models/api/utils.rb | 2 +- .../webapp/WEB-INF/app/models/characteristic.rb | 2 +- .../webapp/WEB-INF/app/models/measure_filter.rb | 4 ++-- .../src/main/webapp/WEB-INF/app/models/metric.rb | 4 ++-- .../main/webapp/WEB-INF/app/models/project.rb | 2 +- .../webapp/WEB-INF/app/models/project_measure.rb | 16 ++++++++-------- .../main/webapp/WEB-INF/app/models/snapshot.rb | 2 +- .../WEB-INF/app/models/sonar/rule_priority.rb | 2 +- .../src/main/webapp/WEB-INF/app/models/user.rb | 4 ++-- .../src/main/webapp/WEB-INF/app/models/widget.rb | 8 ++++---- .../WEB-INF/app/views/drilldown/issues.html.erb | 2 +- .../app/views/drilldown/measures.html.erb | 2 +- .../app/views/manual_measures/new.html.erb | 4 ++-- .../app/views/measures/_display_treemap.html.erb | 2 +- .../WEB-INF/app/views/resource/_options.html.erb | 4 ++-- .../WEB-INF/app/views/resource/index.html.erb | 4 ++-- .../app/views/roles/_edit_groups.html.erb | 2 +- .../WEB-INF/app/views/roles/_edit_users.html.erb | 2 +- .../app/views/settings/_properties.html.erb | 4 ++-- .../views/treemap/_treemap_container.html.erb | 4 ++-- 26 files changed, 49 insertions(+), 49 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb index ab0db2ae28d..f8c06c2b522 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb @@ -104,7 +104,7 @@ class Api::ResourcesController < Api::ApiController resource_id=params[:resource] if resource_id @resource=Project.by_key(resource_id) - @snapshot=(@resource ? @resource.last_snapshot : nil) + @snapshot=(@resource && @resource.last_snapshot) raise ApiException.new(404, "Resource [#{resource_id}] not found") if @snapshot.nil? raise ApiException.new(401, "Unauthorized") unless has_role?(:user, @snapshot) else @@ -558,4 +558,4 @@ class Api::ResourcesController < Api::ApiController end end end -end \ No newline at end of file +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb index 6f9d88fa65f..45993dabf55 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb @@ -29,7 +29,7 @@ class Api::TimemachineController < Api::ApiController def to_id @id ||= begin - MetadataId.new(self.metric.id, self.characteristic ? self.characteristic.id : nil) + MetadataId.new(self.metric.id, self.characteristic && self.characteristic.id) end end @@ -230,4 +230,4 @@ class Api::TimemachineController < Api::ApiController end end -end \ No newline at end of file +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb index b25711ff20c..46d827121e5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb @@ -30,7 +30,7 @@ class BatchBootstrapController < Api::ApiController return render_unauthorized("You're not authorized to execute a dry run analysis. Please contact your SonarQube administrator.") if !has_dryrun_role project = load_project() return render_unauthorized("You're not authorized to access to project '" + project.name + "', please contact your SonarQube administrator") if project && !has_role?(:user, project) - db_content = java_facade.createDatabaseForDryRun(project ? project.id : nil) + db_content = java_facade.createDatabaseForDryRun(project && project.id) send_data String.from_java_bytes(db_content) end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb index 93d39dce42b..6ec1fe7f223 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb @@ -172,7 +172,7 @@ class DashboardController < ApplicationController end unless @dashboard - @dashboard=(active ? active.dashboard : nil) + @dashboard=(active && active.dashboard) end not_found('dashboard') unless @dashboard diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb index ebfab7c0809..0ef0d791add 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb @@ -156,7 +156,7 @@ class IssueController < ApplicationController component_key = params[:component] if Api::Utils.is_integer?(component_key) component = Project.find(component_key) - component_key = (component ? component.key : nil) + component_key = (component && component.key) end issue_result = Internal.issues.create(params.merge({:component => component_key})) @@ -211,4 +211,4 @@ class IssueController < ApplicationController @snapshot = resource.last_snapshot if resource.last_snapshot end -end \ No newline at end of file +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb index ced1751e0a1..9dda91aff19 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb @@ -57,7 +57,7 @@ module SettingsHelper end def option_name(property, field, option) - option_name_with_key(property.key, field ? field.key : nil, option, nil) + option_name_with_key(property.key, field && field.key, option, nil) end def category_help(category) @@ -74,9 +74,9 @@ module SettingsHelper def property_value(property) if property.multi_values? - Property.values(property.key, @resource ? @resource.id : nil) + Property.values(property.key, @resource && @resource.id) else - Property.value(property.key, @resource ? @resource.id : nil, '') + Property.value(property.key, @resource && @resource.id, '') end end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb index 884cba21bc3..c4420dda9c4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb @@ -57,7 +57,7 @@ class Api::Utils # -- Revisions # Added in 3.6 def self.java_to_ruby_datetime(java_date) - java_date ? Time.at(java_date.time/1000) : nil + java_date && Time.at(java_date.time/1000) end def self.is_number?(s) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb index ea2aa2cdc42..252d269021f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb @@ -97,4 +97,4 @@ class Characteristic < ActiveRecord::Base default_value end end -end \ No newline at end of file +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter.rb index 379c90aa4bc..fb393a40399 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter.rb @@ -201,7 +201,7 @@ class MeasureFilter < ActiveRecord::Base init_results init_display(options) user = options[:user] - result = Api::Utils.java_facade.executeMeasureFilter(criteria, (user ? user.id : nil)) + result = Api::Utils.java_facade.executeMeasureFilter(criteria, (user && user.id)) if result.error errors.add_to_base(Api::Utils.message("measure_filter.error.#{result.error}")) else @@ -331,4 +331,4 @@ class MeasureFilter < ActiveRecord::Base end end -end \ No newline at end of file +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb index 4506dac1b20..f776aa8c5fd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb @@ -87,7 +87,7 @@ class Metric < ActiveRecord::Base def self.name_for(metric_key) m=by_key(metric_key) - m ? m.short_name : nil + m && m.short_name end def key @@ -412,4 +412,4 @@ class Metric < ActiveRecord::Base end c end -end \ No newline at end of file +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb index 1621079cd46..4b87f86ae0d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb @@ -186,7 +186,7 @@ class Project < ActiveRecord::Base end def path_name - last_snapshot ? last_snapshot.path_name : nil + last_snapshot && last_snapshot.path_name end def profile(lang, returns_default_if_nil=false) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb index 2ad8fd725f3..ac1865ad301 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb @@ -50,7 +50,7 @@ class ProjectMeasure < ActiveRecord::Base def data if metric.data? - text_value || (measure_data ? measure_data.data : nil) + text_value || (measure_data && measure_data.data) else text_value end @@ -186,13 +186,13 @@ class ProjectMeasure < ActiveRecord::Base def typed_value case metric().val_type when Metric::VALUE_TYPE_INT - (value ? value.to_i : nil) + (value && value.to_i) when Metric::VALUE_TYPE_FLOAT - (value ? value.to_f : nil) + (value && value.to_f) when Metric::VALUE_TYPE_PERCENT - (value ? value.to_f : nil) + (value && value.to_f) when Metric::VALUE_TYPE_MILLISEC - (value ? value.to_i : nil) + (value && value.to_i) when Metric::VALUE_TYPE_BOOLEAN value when Metric::VALUE_TYPE_LEVEL @@ -200,9 +200,9 @@ class ProjectMeasure < ActiveRecord::Base when Metric::VALUE_TYPE_STRING text_value when Metric::VALUE_TYPE_RATING - text_value || (value ? value.to_i : nil) + text_value || (value && value.to_i) else - text_value || (value ? value.to_i : nil) + text_value || (value && value.to_i) end end @@ -271,4 +271,4 @@ class ProjectMeasure < ActiveRecord::Base end -end \ No newline at end of file +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb index e76d74c54ee..68375d17f60 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb @@ -161,7 +161,7 @@ class Snapshot < ActiveRecord::Base def f_measure(metric) m=measure(metric) - m ? m.formatted_value : nil + m && m.formatted_value end def rule_measures(metrics=nil, rule=nil) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb index 66a01feabd2..4549f79193a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb @@ -56,7 +56,7 @@ class Sonar::RulePriority def self.id(priority) begin javaPriority=Java::OrgSonarApiRules::RulePriority.valueOf(priority) - javaPriority ? javaPriority.ordinal : nil + javaPriority && javaPriority.ordinal rescue nil end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb index e5160f56fa6..aa8fda05424 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb @@ -65,7 +65,7 @@ class User < ActiveRecord::Base def email=(value) - write_attribute :email, (value ? value.downcase : nil) + write_attribute :email, (value && value.downcase) end def available_groups @@ -113,7 +113,7 @@ class User < ActiveRecord::Base def property_value(key) prop=property(key) - prop ? prop.value : nil + prop && prop.value end def set_property(options) 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 0e55aed159a..784025f0986 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 @@ -45,9 +45,9 @@ class Widget < ActiveRecord::Base prop=property(property_key) if default_value && property_key=='depth' # we're in SQALE.... Keep the text_value - result = (prop ? prop.text_value : nil)||default_value + result = (prop && prop.text_value)||default_value else - result = (prop ? prop.value : nil) + result = (prop && prop.value) unless result property_definition=java_definition.getWidgetProperty(property_key) result = WidgetProperty.text_to_value(property_definition.defaultValue(), property_definition.type().name()) if property_definition @@ -58,7 +58,7 @@ class Widget < ActiveRecord::Base def property_text_value(key) prop=property(key) - prop ? prop.text_value : nil + prop && prop.text_value end def properties_as_hash @@ -84,4 +84,4 @@ class Widget < ActiveRecord::Base def layout java_definition.getWidgetLayout().name() end -end \ No newline at end of file +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb index dd3bd47d213..8ce2520890d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb @@ -144,7 +144,7 @@ <% if resource.source_code? %> - 'resource', :action => 'index', :id => resource.key, :period => @period, :metric => (@metric && @metric.id), :rule => @rule ? @rule.id : @severity, :display_title => 'true' -%>" onclick="window.open(this.href,'resource-<%= resource.key.parameterize -%>','height=800,width=900,scrollbars=1,resizable=1');return false;" id="popup-<%= resource.key.parameterize -%>" diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb index c2d3497228f..ffebc545822 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb @@ -62,7 +62,7 @@ <% if resource.source_code? %> - <%= image_tag 'new-window-16.gif', :alt => message('new_window') -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb index ab98dee404f..7b89c2b2b4d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb @@ -27,7 +27,7 @@ <%= link_to message('manual_measures.manage_metrics_link'), :controller => 'metrics', :action => 'index' if has_role?(:admin)-%> @@ -96,4 +96,4 @@ -<% end %> \ No newline at end of file +<% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb index 8987e3701f6..9296acc6c89 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb @@ -53,7 +53,7 @@ <%= metric_select_tag 'tmColor', Metric.all.select { |m| m.treemap_color? }, :html_id => 'select-tm-color', :allow_empty => false, - :selected_key => (filter.display.color_metric ? filter.display.color_metric.key : nil) -%> + :selected_key => (filter.display.color_metric && filter.display.color_metric.key) -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb index 09f817ea2e0..8d7706cdf9b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb @@ -60,7 +60,7 @@ <% if logged_in? && @issue_results && @issue_results.issues && !@issue_results.issues.empty? %> - <%= message('bulk_change') -%> <% end %> @@ -121,4 +121,4 @@ -<% end %> \ No newline at end of file +<% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb index 654a2df04a3..663eb895e8d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb @@ -1,4 +1,4 @@ -<%= render :partial => 'gwt/base', :locals => {:resource => @resource, :popup => true, :metric => (@metric ? @metric.key : nil)} -%> +<%= render :partial => 'gwt/base', :locals => {:resource => @resource, :popup => true, :metric => (@metric && @metric.key)} -%> <%= render :partial => 'gwt/resource_viewers' -%>
@@ -13,4 +13,4 @@ function onBulkIssues(issues_query_params){ window.location.reload(); } - \ No newline at end of file + diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb index b33f02316b6..f3a72cf5110 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb @@ -1,5 +1,5 @@ <% - project_id = @project ? @project.id : nil + project_id = (@project && @project.id) granted_groups=groups(@role, project_id) ungranted_groups=all_groups - granted_groups %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_edit_users.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_edit_users.html.erb index 07a4e2bf1f9..25249202b5e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_edit_users.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_edit_users.html.erb @@ -1,5 +1,5 @@ <% - project_id = @project ? @project.id : nil + project_id = (@project && @project.id) granted_users=users(@role, project_id) ungranted_users=(all_users - granted_users) %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb index da8ca003b74..e4efd116a75 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb @@ -1,7 +1,7 @@ <% if @category.isSpecial -%> <%= render 'special', :url => url_for(:controller => "#{@category.key}_configuration") -%> <% else -%> - <% form_remote_tag :url => {:controller => 'settings', :action => 'update', :category => @category.key, :subcategory => @subcategory.key, :resource_id => @resource ? @resource.id : nil}, + <% form_remote_tag :url => {:controller => 'settings', :action => 'update', :category => @category.key, :subcategory => @subcategory.key, :resource_id => (@resource && @resource.id)}, :method => :post, :before => "$('submit_settings').hide();$('loading_settings').show();", :update => 'properties', @@ -10,7 +10,7 @@ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/treemap/_treemap_container.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/treemap/_treemap_container.html.erb index 457a263fe21..575cdcb37a7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/treemap/_treemap_container.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/treemap/_treemap_container.html.erb @@ -4,7 +4,7 @@ <%= message('size') -%>
- <%= select_tag "size", options_grouped_by_domain(Sonar::Treemap.size_metrics, (size_metric ? size_metric.key : nil), :include_empty => true), + <%= select_tag "size", options_grouped_by_domain(Sonar::Treemap.size_metrics, (size_metric && size_metric.key), :include_empty => true), :id => "tm-size-#{treemap_id}", :class => 'small medium-width spacer-right', :onchange => "return treemapById(#{treemap_id}).changeSizeMetric(this.value)" %> @@ -12,7 +12,7 @@ <%= message('color') -%>
- <%= select_tag 'color', options_grouped_by_domain(Sonar::Treemap.color_metrics, (color_metric ? color_metric.key : nil), :include_empty => true), + <%= select_tag 'color', options_grouped_by_domain(Sonar::Treemap.color_metrics, (color_metric && color_metric.key), :include_empty => true), :id => "tm-color-#{treemap_id}", :class => 'small medium-width', :onchange => "return treemapById(#{treemap_id}).changeColorMetric(this.value)" %> <%= image_tag 'loading.gif', :id => "tm-loading-#{treemap_id}", :style => 'vertical-align: top;display: none' -%> -- 2.39.5