app/models/base_organisation.rb
Method has too many lines. [9/7] (https://github.com/bbatsov/ruby-style-guide#short-methods) Open
Open
def gmaps4rails_marker_attrs
if has_been_updated_recently?
['marker.png',
'data-id' => id,
class: 'marker']
- Read upRead up
- Exclude checks
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
Open
validates_url :donation_info, preferred_scheme: 'http://', message: 'Donation url is not a valid URL',
- Exclude checks
Line is too long. [93/90] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
validates_url :website, preferred_scheme: 'http://', message: 'Website is not a valid URL',
- Exclude checks
Rename has_been_updated_recently?
to been_updated_recently?
. (https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark) Open
Open
def has_been_updated_recently?
- Read upRead up
- Exclude checks
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