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

Improve bike searching concern #673

Open
sethherr opened this issue Apr 5, 2019 · 0 comments
Open

Improve bike searching concern #673

sethherr opened this issue Apr 5, 2019 · 0 comments
Labels

Comments

@sethherr
Copy link
Member

sethherr commented Apr 5, 2019

The BikeSearchable concern is confusing and not performant.

  • It should improve performance (look at our Skylight, consider the results from rack-mini-profiler)
  • It shouldn't reduce passing executed sql queries (currently done in non_serial_matches for the color search), and should instead use correct sql.
  • It should be restructured to being a service instead of a concern
  • It should (probably) use private methods - even if this means we have to use send in tests (I feel better about doing this since watching episodes of on writing software well)

Note: it was written as a concern rather than a service originally was so that the methods could be written in a more functionalish style, without having to pass the activerecord collection around - I would like to maintain the funcationalish-ness, but now think passing the collection around is would be better than what we are doing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant