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

Apply rubocop Rails/FindBy rule everywhere #3834

Merged
merged 2 commits into from
Nov 8, 2019
Merged

Conversation

javierm
Copy link
Member

@javierm javierm commented Nov 8, 2019

References

Objectives

  • Make the code more consistent

Notes

We should probably replace some find_by usages with find_by!, but that's an issue for a different pull request.

@javierm javierm added the Linters Rubocop, ERB Lint, ESLint, SCSS-Lint, ... label Nov 8, 2019
@javierm javierm self-assigned this Nov 8, 2019
@javierm javierm added this to Reviewing in Roadmap via automation Nov 8, 2019
app/controllers/officing/voters_controller.rb Show resolved Hide resolved
spec/features/polls/voter_spec.rb Show resolved Hide resolved
spec/features/polls/voter_spec.rb Show resolved Hide resolved
spec/features/polls/voter_spec.rb Show resolved Hide resolved
spec/features/budget_polls/voter_spec.rb Show resolved Hide resolved
@javierm javierm changed the title Apply rubocop Rails/FindBy rule everywhere Apply rubocop Rails/FindBy rule everywhere Nov 8, 2019
We didn't detect these cases because by default the rule only searches
for offenses in `app/models/`.
We were manually doing a similar thing - only we weren't raising an
exception when we should.
@javierm javierm merged commit 6778bdb into master Nov 8, 2019
Roadmap automation moved this from Reviewing to Release 1.1.0 Nov 8, 2019
@javierm javierm deleted the find_by_everywhere branch November 8, 2019 19:32
smarques pushed a commit to venetochevogliamo/consul that referenced this pull request Apr 29, 2020
Apply rubocop Rails/FindBy rule everywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linters Rubocop, ERB Lint, ESLint, SCSS-Lint, ...
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

None yet

2 participants