app/services/queries/organisations.rb
Method has too many lines. [10/7] (https://github.com/bbatsov/ruby-style-guide#short-methods) Open
Open
def self.search_by_keyword_and_category(parsed_params)
organisations = order_by_most_recent.search_by_keyword(
parsed_params.query_term
)
- 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.
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
Open
has_owner = "organisations.id IN (SELECT users.organisation_id FROM users)"
- Read upRead up
- Exclude checks
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"