rauversion/rauversion-ror

View on GitHub
app/models/category.rb

Summary

Maintainability
C
1 day
Test Coverage

Method all has 193 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def self.all
    [
      {
        "genre" => "Ambient",
        "subgenres" => [
Severity: Major
Found in app/models/category.rb - About 7 hrs to fix

    File category.rb has 275 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    class Category < ApplicationRecord
      extend FriendlyId
      friendly_id :name, use: :slugged
    
      def self.genres
    Severity: Minor
    Found in app/models/category.rb - About 2 hrs to fix

      Method genres has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def self.genres
          [
            "Alternative Rock",
            "Ambient",
            "Classical",
      Severity: Minor
      Found in app/models/category.rb - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status