BathHacked/energy-sparks

View on GitHub
app/models/management_priority.rb

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Method for_school_group has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def self.for_school_group(school_group)
    query = <<-SQL.squish
      SELECT a.school_id, a.id, cv.alert_type_rating_id, vars.average_one_year_saving_£, vars.one_year_saving_co2, vars.one_year_saving_kwh
      FROM management_priorities mp
      INNER JOIN alert_type_rating_content_versions cv ON mp.alert_type_rating_content_version_id = cv.id
Severity: Minor
Found in app/models/management_priority.rb - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status