Commit 473d215ef00739226da9e7c3077429c54d912bc1

Authored by Rafael Manzo
1 parent 61763a24

Improve MetricConfigurationControllers readability

Calling methods with self improve the readability as it makes clear that
it is not a variable but a method!

Signed off by: Daniel Miranda <danielkza2@gmail.com>
app/controllers/base_metric_configurations_controller.rb
... ... @@ -123,7 +123,7 @@ class BaseMetricConfigurationsController &lt; ApplicationController
123 123 metric = collector.find_metric_by_name(params[:metric_name])
124 124 end
125 125  
126   - if !metric.nil? && metric.type == metric_type
  126 + if !metric.nil? && metric.type == self.metric_type
127 127 @metric_configuration.metric = metric
128 128 return
129 129 end
... ...
app/controllers/compound_metric_configurations_controller.rb
... ... @@ -4,7 +4,7 @@ class CompoundMetricConfigurationsController &lt; BaseMetricConfigurationsControlle
4 4 protected
5 5  
6 6 def set_metric!
7   - @metric_configuration.metric.type = metric_type
  7 + @metric_configuration.metric.type = self.metric_type
8 8 end
9 9  
10 10 def metric_configuration_params
... ...