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

Make has_expected_db_index? check optional on HaveSecureTokenMatcher #1277

Closed
nikosmichas opened this issue Feb 18, 2020 · 0 comments · Fixed by #1278
Closed

Make has_expected_db_index? check optional on HaveSecureTokenMatcher #1277

nikosmichas opened this issue Feb 18, 2020 · 0 comments · Fixed by #1278

Comments

@nikosmichas
Copy link
Contributor

The check here could be optional

if !has_expected_db_index?
@errors << "missing unique index for #{table_and_column}"
end

has_secure_token encourages to use an index but does not enforce it.

https://github.com/rails/rails/blob/a273da7619ac6a2b2f98532a5610238c68ad219b/activerecord/lib/active_record/secure_token.rb#L31

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 a pull request may close this issue.

1 participant