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

Add new Rails/MatchRoute cop #275

Merged
merged 1 commit into from
Jun 30, 2020
Merged

Conversation

fatkodima
Copy link
Contributor

https://rails.rubystyle.guide/#no-match-routes

# bad
match ':controller/:action/:id'
match 'photos/:id', to: 'photos#show', via: :get

# good
get ':controller/:action/:id'
get 'photos/:id', to: 'photos#show'
match 'photos/:id', to: 'photos#show', via: [:get, :post]
match 'photos/:id', to: 'photos#show', via: :all

@fatkodima
Copy link
Contributor Author

Updated.

config/default.yml Outdated Show resolved Hide resolved
config/default.yml Outdated Show resolved Hide resolved
@fatkodima
Copy link
Contributor Author

Updated.

@koic koic merged commit 840f152 into rubocop:master Jun 30, 2020
@koic
Copy link
Member

koic commented Jun 30, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants