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
this results in failures for past migrations that include the acronym OAuth in their class name like class RemoveUnusedOAuthScopeGrants.
Expected behavior
No cop should be raised.
Actual behavior
db/migrate/20210623095243_remove_unused_oauth_scope_grants.rb:1:7: C: [Correctable] Rails/MigrationClassName: Replace with RemoveUnusedOauthScopeGrants that matches the file name.
class RemoveUnusedOAuthScopeGrants < ActiveRecord::Migration[6.1]
… cop
Fixesrubocop#664.
This PR fixes a false positive for `Rails/MigrationClassName` when
`ActiveSupport::Inflector` is applied to the class name and the case
is different.
Occasionally user want to treat a word like `Oauth` as` OAuth`.
This PR is case insensitive for comparisons between migration class name
and filename. It's may not a big deal because it's based on filename.
When using inflections, like:
this results in failures for past migrations that include the acronym
OAuth
in their class name likeclass RemoveUnusedOAuthScopeGrants
.Expected behavior
No cop should be raised.
Actual behavior
Steps to reproduce the problem
Add
Create a migration that includes
OAuth
acronym in its class nameRuboCop version
The text was updated successfully, but these errors were encountered: