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

Use hash style for AR queries #35

Open
roman-dubrovsky opened this issue Jul 4, 2019 · 2 comments
Open

Use hash style for AR queries #35

roman-dubrovsky opened this issue Jul 4, 2019 · 2 comments
Labels
feature request New feature or request hacktoberfest For Hacktoberfest contributors

Comments

@roman-dubrovsky
Copy link
Contributor

Prefer a hash style that string style for AR queries

#bad
workflow_scope.where("id = ?", params[:id])

# good
workflow_scope.where(id: params[:id])

I think this rule should be included to the rails rubocop config so we don't need to add a separate rule

@roman-dubrovsky roman-dubrovsky added postponed Not valuable for now feature request New feature or request labels Jul 4, 2019
@AleksSenkou
Copy link

Agreed 👍

@roman-dubrovsky roman-dubrovsky added this to the 0.6.0 milestone Oct 24, 2019
@roman-dubrovsky roman-dubrovsky removed the postponed Not valuable for now label Oct 24, 2019
@roman-dubrovsky roman-dubrovsky modified the milestones: 0.6.0, 0.7.0 Nov 4, 2019
@roman-dubrovsky roman-dubrovsky added the postponed Not valuable for now label Nov 6, 2019
@roman-dubrovsky roman-dubrovsky removed this from the 0.7.0 milestone Nov 6, 2019
@nikitasakau nikitasakau self-assigned this Jan 24, 2020
@nikitasakau
Copy link
Member

nikitasakau commented Jan 27, 2020

I've spent some time in order to find this cop, but I haven't found anything. Looks like we have to implement our own

@nikitasakau nikitasakau removed their assignment Jan 28, 2020
@atatarenko atatarenko added hacktoberfest For Hacktoberfest contributors and removed postponed Not valuable for now labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request hacktoberfest For Hacktoberfest contributors
Projects
None yet
Development

No branches or pull requests

4 participants