LiteracyVolunteersOfMA/lvm-rails

View on GitHub

Showing 11 of 25 total issues

Method tutor_params has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def tutor_params
    params.require(:tutor).permit(
      :address1,
      :address2,
      :age_preference,
Severity: Major
Found in app/controllers/tutors_controller.rb - About 2 hrs to fix

    Method student_params has 61 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def student_params
        params.require(:student).permit(
          :first_name,
          :last_name,
          :date_of_birth,
    Severity: Major
    Found in app/controllers/students_controller.rb - About 2 hrs to fix

      Class StudentsController has 21 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class StudentsController < ApplicationController
        before_action :ensure_coordinator_or_admin!
        before_action :set_student, only: %i[show edit]
        helper_method :tutor?
      
      
      Severity: Minor
      Found in app/controllers/students_controller.rb - About 2 hrs to fix

        Method us_states has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def us_states
            [
              ['AK', 'AK'],
              ['AL', 'AL'],
              ['AR', 'AR'],
        Severity: Major
        Found in app/helpers/application_helper.rb - About 2 hrs to fix

          File tutors_controller.rb has 255 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          class TutorsController < ApplicationController
            before_action :ensure_coordinator_or_admin!
            before_action :set_tutor, only: %i[show edit]
          
            add_breadcrumb 'Home', :root_path
          Severity: Minor
          Found in app/controllers/tutors_controller.rb - About 2 hrs to fix

            Method index has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def index
                add_breadcrumb 'Students'
            
                @assessments_button = {
                  text: 'View All Assessments',
            Severity: Minor
            Found in app/controllers/students_controller.rb - About 1 hr to fix

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

                def index
                  add_breadcrumb 'Tutors'
              
                  @new_button = {
                    text: 'Create New Tutor',
              Severity: Minor
              Found in app/controllers/tutors_controller.rb - About 1 hr to fix

                Method native_language has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def native_language
                    [
                      ['English', 'English'],
                      ['Albanian', 'Albanian'],
                      ['Arabic', 'Arabic'],
                Severity: Minor
                Found in app/helpers/tutors_helper.rb - About 1 hr to fix

                  Method student_assesments_index has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def student_assesments_index
                      @student = Student.of(current_user).find(params[:id])
                  
                      add_breadcrumb 'Students', students_path
                      add_breadcrumb 'Assessments', assessments_path
                  Severity: Minor
                  Found in app/controllers/assessments_controller.rb - About 1 hr to fix

                    Method referral has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def referral
                        [
                          ['ABE Center', 'ABE Center'],
                          ['Brochure/Poster/Flyer', 'Brochure/Poster/Flyer'],
                          ['Church', 'Church'],
                    Severity: Minor
                    Found in app/helpers/tutors_helper.rb - About 1 hr to fix

                      Method index has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def index
                          add_breadcrumb 'Students', students_path
                          add_breadcrumb 'Assessments'
                      
                          @clickable_rows = true
                      Severity: Minor
                      Found in app/controllers/assessments_controller.rb - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language