consul/consul

View on GitHub
app/models/community.rb

Summary

Maintainability
A
0 mins
Test Coverage

Specify a :dependent option. (https://rails.rubystyle.guide#has_many-has_one-dependent-option)
Open

  has_one :proposal
Severity: Minor
Found in app/models/community.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

Specify a :dependent option. (https://rails.rubystyle.guide#has_many-has_one-dependent-option)
Open

  has_one :investment, class_name: "Budget::Investment"
Severity: Minor
Found in app/models/community.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

Specify a :dependent option. (https://rails.rubystyle.guide#has_many-has_one-dependent-option)
Open

  has_many :topics
Severity: Minor
Found in app/models/community.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

There are no issues that match your filters.

Category
Status