diff --git a/.rubocop.yml b/.rubocop.yml index 951d8129..86153825 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -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 diff --git a/lib/inherited_resources/base_helpers.rb b/lib/inherited_resources/base_helpers.rb index a352ea39..ae889637 100644 --- a/lib/inherited_resources/base_helpers.rb +++ b/lib/inherited_resources/base_helpers.rb @@ -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. @@ -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