Andy Waite
Andy Waite
I support this cop if disabled by default, but I'd like to see an addition to the https://github.com/rubocop/rails-style-guide first which can be referenced as a migration path.
Let's also update the PR title so it shows up when people search for `WhereNotWithMultipleConditions`.
@tejasbubane both those gems are packaged with Rails, so would still be in `Gemfile.lock` even if not used. One approach might be check for the string `ActiveRecord::Schema` within `db/schema.rb`.
(btw there's a typo in the PR title, "Destory" instead of "Destroy")
This also relates to the Config aspect of The Twelve-Factor App pattern: > Another aspect of config management is grouping. Sometimes apps batch config into named groups (often called “environments”)...
> Doesn't modern Ruby's squiggly heredoc
I think a better approach is configure your app to trigger an error notification when there is a missing translation: https://thoughtbot.com/blog/foolproof-i18n-setup-in-rails
Which version of the gem are you using? The spec indicates it should ignore non-AR classes. https://github.com/rubocop/rubocop-rails/blob/944394b9a45c82137cd9af8852ef43b3cd472265/spec/rubocop/cop/rails/find_each_spec.rb#L94-L100
> Post.where (source_type: "Feed", source_id: 100) Did you mean to write `Post.where.not(source_type: "Feed", source_id: 100)` ?
An alternative way to enforce this would be to configure Rails to raise on deprecation warnings: > config.active_support.deprecation = :raise