AgileVentures/LocalSupport

View on GitHub
app/models/base_organisation.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

  def gmaps4rails_marker_attrs
    if has_been_updated_recently?
      ['marker.png',
        'data-id' => id,
       class: 'marker']
Severity: Minor
Found in app/models/base_organisation.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.

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

  validates_url :donation_info, preferred_scheme: 'http://', message: 'Donation url is not a valid URL',
Severity: Minor
Found in app/models/base_organisation.rb by rubocop

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

  validates_url :website, preferred_scheme: 'http://', message: 'Website is not a valid URL',
Severity: Minor
Found in app/models/base_organisation.rb by rubocop

Rename has_been_updated_recently? to been_updated_recently?. (https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark)
Open

  def has_been_updated_recently?
Severity: Minor
Found in app/models/base_organisation.rb by rubocop

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

There are no issues that match your filters.

Category
Status