BathHacked/energy-sparks

View on GitHub
app/controllers/schools_controller.rb

Summary

Maintainability
A
2 hrs
Test Coverage
A
98%

Method school_params has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def school_params
    params.require(:school).permit(
      :name,
      :activation_date,
      :school_type,
Severity: Minor
Found in app/controllers/schools_controller.rb - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

        if can?(:show_management_dash, @school)
          @add_contacts = site_settings.message_for_no_contacts && @school.contacts.empty? && can?(:manage, Contact)
          @add_pupils = site_settings.message_for_no_pupil_accounts && @school.users.pupil.empty? && can?(:manage_users, @school)
          @prompt_training = @show_data_enabled_features && current_user.confirmed_at > 30.days.ago
          @prompt_for_bill = @school.bill_requested && can?(:index, ConsentDocument)
    Severity: Major
    Found in app/controllers/schools_controller.rb - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status