vital-edu/sala-de-espera

View on GitHub
app/models/service_category.rb

Summary

Maintainability
A
0 mins
Test Coverage

Specify a :dependent option.
Open

  has_many :services
Severity: Minor
Found in app/models/service_category.rb by rubocop

This cop looks for has_many or has_one associations that don't specify a :dependent option. It doesn't register an offense if :through option was specified.

Example:

# bad
class User < ActiveRecord::Base
  has_many :comments
  has_one :avatar
end

# good
class User < ActiveRecord::Base
  has_many :comments, dependent: :restrict_with_exception
  has_one :avatar, dependent: :destroy
  has_many :patients, through: :appointments
end

Missing top-level class documentation comment.
Open

class ServiceCategory < ApplicationRecord
Severity: Minor
Found in app/models/service_category.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

Line is too long. [100/80]
Open

                                 content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif']
Severity: Minor
Found in app/models/service_category.rb by rubocop

There are no issues that match your filters.

Category
Status