<p dir="auto">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 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1954133496" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4301" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4301/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4301">#4301</a>. After this change I won't have to do it.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4575'>https://github.com/openstreetmap/openstreetmap-website/pull/4575</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4575/commits/511ce4ab89c4f3dfb5c08d2fea9c9743c31793ea" class="commit-link">511ce4a</a> Collect node/way/relation CanCanCan subjects into arrays</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4575/files">3 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4575/files#diff-debf59904131dc89a88ab44cbb1d6deaaa5a7d70c0507f674080df62f7c8e41f">app/abilities/ability.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4575/files#diff-341a1cf4f83cf00816b397c262181cd7b229f1c0e9210ba57dcef3f9609c1b74">app/abilities/api_ability.rb</a>
(10)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4575/files#diff-38488bd50be0cf63517ec5ae3fd3c4e462b3fdda7201844b0ab3442b73b8c08d">app/abilities/api_capability.rb</a>
(10)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4575.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4575.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4575.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4575.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4575">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLL22SELBRDZUMZJHWDYYDRCFAVCNFSM6AAAAABEVC76A6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4DKMJRHA3TGMI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPBQ2QBDR5XADF73MDYYDRCFA5CNFSM6AAAAABEVC76A6WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHIEPSEBM.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4575</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4575",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4575",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>