AgileVentures/LocalSupport

View on GitHub
app/helpers/devise_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage

Method has too many lines. [15/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def devise_error_messages!
    return "" if resource.errors.empty?

    errors = resource.errors
    reset_token_error = errors.to_hash.fetch(:reset_password_token,'')
Severity: Minor
Found in app/helpers/devise_helper.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for devise_error_messages! is too high. [19.52/15] (http://c2.com/cgi/wiki?AbcMetric)
Open

  def devise_error_messages!
    return "" if resource.errors.empty?

    errors = resource.errors
    reset_token_error = errors.to_hash.fetch(:reset_password_token,'')
Severity: Minor
Found in app/helpers/devise_helper.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://github.com/bbatsov/ruby-style-guide#consistent-string-literals)
Open

    return "" if resource.errors.empty?
Severity: Minor
Found in app/helpers/devise_helper.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

There are no issues that match your filters.

Category
Status