Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves #2
context
Hi @joemasilotti, nice to meet you 🤝. I came across this repo by way of your latest newsletter. I am in the process of writing a
Rails x Tailwind x Turbo
-app myself, so I decided to dig into the source code here a little bit. Thehelp wanted
-issues are great to solve some issues while looking around the code base.solution
The sorting happens on the
ruby
-level (i.e. usingsort_by
). This way we do not have to cross the#amount
-abstraction level implemented bymeasured-rails
. Performance-wise - I think - it's okay, since we'll have to load the threeWaterEntry
s from the db for rendering the view anyway, so we might as well do the sorting after loading everything from the db.I added two
clean up
-type commits on top.Let me know what you think.
Kind regards from Germany 🇩🇪,
Jan