You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's near impossible to detect using static analysis, however, I've seen this defined as:
status{Model.status[:queued]}
which is equivalent to the above (just translates a symbol to its DB-level numeric representation explicitly rather than relying on ORM to do that). Those cases are detectable.
NOTE: Enum traits appeared in FactoryBot 6.1, so probably we'll need to introduce version configuration a-la TargetFactoryBotVersion (see rubocop-rails for an example).
The text was updated successfully, but these errors were encountered:
ydah
transferred this issue from rubocop/rubocop-rspec
May 6, 2023
FactoryBot has an enum traits feature that given a model:
makes the following definitions redundant:
It's near impossible to detect using static analysis, however, I've seen this defined as:
which is equivalent to the above (just translates a symbol to its DB-level numeric representation explicitly rather than relying on ORM to do that). Those cases are detectable.
NOTE: Enum traits appeared in FactoryBot 6.1, so probably we'll need to introduce version configuration a-la
TargetFactoryBotVersion
(seerubocop-rails
for an example).The text was updated successfully, but these errors were encountered: