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

Collect node/way/relation CanCanCan subjects into arrays #4575

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

AntonKhorev
Copy link
Collaborator

Different element types usually have the same actions with three very similar lines in ability files. It's possible to turn them into one line, also decreasing the complexity Rubocop complains about. I still have PRs where I need to increase complexity limits like #4301. After this change I won't have to do it.

@tomhughes
Copy link
Member

Nice (well other than that horrid line end condition but that's rubocop's fault not yours).

@tomhughes tomhughes merged commit 5ba71f9 into openstreetmap:master Mar 14, 2024
20 checks passed
@AntonKhorev AntonKhorev deleted the can-subject-arrays branch March 14, 2024 22:32
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.

2 participants