Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable some Lint cops to prevent warnings #951

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ Layout/TrailingWhitespace:
Layout/TrailingEmptyLines:
Enabled: true

Lint/AmbiguousOperator:
Enabled: true

Lint/AmbiguousRegexpLiteral:
Enabled: true

Lint/UselessAssignment:
Enabled: true

Minitest:
Enabled: true

Expand Down
4 changes: 2 additions & 2 deletions lib/inherited_resources/base_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def smart_resource_url
if respond_to? :show
url = resource_url rescue nil
end
url ||= smart_collection_url
url || smart_collection_url
end

# URL to redirect to when redirect implies collection url.
Expand All @@ -309,7 +309,7 @@ def smart_collection_url
if respond_to? :parent, true
url ||= parent_url rescue nil
end
url ||= root_url rescue nil
url || root_url rescue nil
end

# memoize the extraction of attributes from params
Expand Down
Loading