korolvs/thatsaboy

View on GitHub
api/app/models/user/user.rb

Summary

Maintainability
A
0 mins
Test Coverage

Prefer Date or Time over DateTime.
Open

    self.confirmed_at = DateTime.now.utc
Severity: Minor
Found in api/app/models/user/user.rb by rubocop

This cop checks for uses of DateTime that should be replaced by Date or Time.

Example:

# bad - uses `DateTime` for current time
DateTime.now

# good - uses `Time` for current time
Time.now

# bad - uses `DateTime` for modern date
DateTime.iso8601('2016-06-29')

# good - uses `Date` for modern date
Date.iso8601('2016-06-29')

# good - uses `DateTime` with start argument for historical date
DateTime.iso8601('1751-04-23', Date::ENGLAND)

Method User::User#password= is defined at both api/app/models/user/user.rb:24 and api/app/models/user/user.rb:47.
Open

  def password=(password)
Severity: Minor
Found in api/app/models/user/user.rb by rubocop

This cop checks for duplicated instance (or singleton) method definitions.

Example:

# bad

def duplicated
  1
end

def duplicated
  2
end

Example:

# bad

def duplicated
  1
end

alias duplicated other_duplicated

Example:

# good

def duplicated
  1
end

def other_duplicated
  2
end

There are no issues that match your filters.

Category
Status