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

Split Candidates#each in few methods #773

Merged
merged 1 commit into from
Jan 25, 2017

Conversation

novikserg
Copy link
Contributor

Hey,

This PR splits Candidates#each method, thus separating actual yielding from constructing/filtering elements.

A minor change, but we can further improve from here: one idea is to create a Candidate class, and move slug construction/validation there.

Should also solve CodeClimate Issue (https://codeclimate.com/github/norman/friendly_id/FriendlyId::Candidates#complexity)

Main idea is to make this part of code more readable (while keeping simplicity/flexibility)

@novikserg novikserg changed the title Split Candidates#each in two methods Split Candidates#each in few methods Sep 29, 2016
@novikserg novikserg force-pushed the feature/refactor_candidates_each branch from 315af6f to f0a819a Compare September 29, 2016 20:36
@coveralls
Copy link

coveralls commented Sep 29, 2016

Coverage Status

Coverage decreased (-0.4%) to 96.296% when pulling 315af6f on novikserg:feature/refactor_candidates_each into aff0564 on norman:master.

@coveralls
Copy link

coveralls commented Sep 29, 2016

Coverage Status

Coverage decreased (-0.4%) to 96.296% when pulling f0a819a on novikserg:feature/refactor_candidates_each into aff0564 on norman:master.

@parndt
Copy link
Collaborator

parndt commented Jan 25, 2017

Thanks @novikserg

@parndt parndt merged commit dac59ef into norman:master Jan 25, 2017
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 this pull request may close these issues.

3 participants