<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/360803?s=20&v=4" /><strong>gravitystorm</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6607#issuecomment-3637922562">(openstreetmap/openstreetmap-website#6607)</a></div>
<p dir="auto">I agree this should be consistent.</p>
<p dir="auto">It's exactly the kind of thing we need a linter for, otherwise it'll just drift again in the future - it's clearly not an easy thing to spot during reviews! I've checked the <code class="notranslate">rubocop-factory_bot</code> repo, and found <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1777001599" data-permission-text="Title is private" data-url="https://github.com/rubocop/rubocop-factory_bot/issues/57" data-hovercard-type="issue" data-hovercard-url="/rubocop/rubocop-factory_bot/issues/57/hovercard" href="https://github.com/rubocop/rubocop-factory_bot/issues/57">rubocop/rubocop-factory_bot#57</a> . Ideally, that would be implemented upstream, or perhaps we would implement it ourselves as a <a href="https://github.com/openstreetmap/openstreetmap-website/tree/4c97ee96df281efd0e4129e3a841d12fbdb898f7/.rubocop">custom cop</a>.</p>
<p dir="auto">As for which name - it seems like there's three conventions:</p>
<ul dir="auto">
<li>singular model name</li>
<li>plural model name</li>
<li>singular model name plus "_factory" suffix</li>
</ul>
<p dir="auto">I've check the factory_bot docs, and they don't mention anything. <a href="https://github.com/ctran/annotate_models/"><code class="notranslate">annotate_models</code></a> (mentioned in the issue above) supports the three alternatives (while referring to "_factory" suffix as <a href="https://github.com/ctran/annotate_models/blob/develop/lib/annotate/annotate_models/file_patterns.rb#L107">"old style"</a>). Neither Discourse nor Mastodon use factory_bot. I can't find a style guide with any suggestions.</p>
<p dir="auto">Personally I prefer the plural option, since my IDE then shows "user.rb" and "users.rb" and I know which is which ðŸ˜„ But I'm eager to find some better reasoning than that.</p>

<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/6607#issuecomment-3637922562">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNFZEF2TQCHZRIND2T4BBCWTAVCNFSM6AAAAACOUAXDO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMMZXHEZDENJWGI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLN2MY3LQLIPQWYV5QT4BBCWTA5CNFSM6AAAAACOUAXDO2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTWY2ZFQE.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/6607/c3637922562</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/6607#issuecomment-3637922562",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6607#issuecomment-3637922562",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>