AgileVentures/LocalSupport

View on GitHub
app/models/user.rb

Summary

Maintainability
A
0 mins
Test Coverage

Unused method argument - org. If it's necessary, use _ or _org as an argument name to indicate that it won't be used. You can also write as can_delete?(*) if you want the method to accept any arguments but don't care about them. (https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars)
Open

  def can_delete? org
Severity: Minor
Found in app/models/user.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Line is too long. [101/90] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

  belongs_to :pending_organisation, class_name: 'Organisation', foreign_key: :pending_organisation_id
Severity: Minor
Found in app/models/user.rb by rubocop

Line is too long. [100/90] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

  #attr_accessible :email, :password, :password_confirmation, :remember_me, :pending_organisation_id
Severity: Minor
Found in app/models/user.rb by rubocop

Line is too long. [150/90] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

  scope :invited_not_accepted,-> {includes(:organisation).where('users.invitation_sent_at IS NOT NULL').where('users.invitation_accepted_at IS NULL')}
Severity: Minor
Found in app/models/user.rb by rubocop

Line is too long. [97/90] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

  # should we have a before_save here where we check if the pending_organization_id is going from
Severity: Minor
Found in app/models/user.rb by rubocop

Line is too long. [100/90] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

    # superadmin false, pending_organisation  pending_organisation!=organisation org != organisation
Severity: Minor
Found in app/models/user.rb by rubocop

There are no issues that match your filters.

Category
Status