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

Rails/MatchRoute error #305

Closed
luigi opened this issue Jul 21, 2020 · 1 comment · Fixed by #308
Closed

Rails/MatchRoute error #305

luigi opened this issue Jul 21, 2020 · 1 comment · Fixed by #308
Labels
bug Something isn't working

Comments

@luigi
Copy link

luigi commented Jul 21, 2020

Expected behavior

No error.

Actual behavior

Output:

1 error occurred:
An error occurred while Rails/MatchRoute cop was inspecting /.../pandemic-ebt-ca/config/routes.rb:18:14.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop-hq/rubocop/issues

Mention the following information in the issue report:
0.88.0 (using Parser 2.7.1.4, rubocop-ast 0.2.0, running on ruby 2.6.6 x86_64-darwin19)
RuboCop failed!

I reverted back to Rubocop 0.87.1, but the problem persisted.

Steps to reproduce the problem

Run rubocop on the following routes.rb file:

https://github.com/codeforamerica/pandemic-ebt-ca/blob/master/config/routes.rb#L17-L19

17            { get: :edit, put: :update }.each do |method, action|
18              match "/#{controller_class.to_param}",
19                    action: action,

RuboCop version

0.88.0 (using Parser 2.7.1.4, rubocop-ast 0.2.0, running on ruby 2.6.6 x86_64-darwin19)
@marcandre marcandre transferred this issue from rubocop/rubocop Jul 21, 2020
@marcandre
Copy link

I'm assuming the error lies within the cop Rails/MatchRoute, transfering...

@koic koic added the bug Something isn't working label Jul 22, 2020
tejasbubane added a commit to tejasbubane/rubocop-rails that referenced this issue Jul 24, 2020
tejasbubane added a commit to tejasbubane/rubocop-rails that referenced this issue Jul 24, 2020
tejasbubane added a commit to tejasbubane/rubocop-rails that referenced this issue Jul 24, 2020
@koic koic closed this as completed in #308 Jul 25, 2020
koic added a commit that referenced this issue Jul 25, 2020
[Fix #305] Fix crash in `Rails/MatchRoute` cop when `via` option is a variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants