Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have now put the code that fetches and processes query parameters into separate functions "sort_by_params" and "ratings_params" to clean things up a bit. "ratings_params" returns an array of ratings that should be displayed, which can simply be passed to Model.where(rating: _) to achieve the desired result. Additionally it is saved as an instance variable so the checkboxes can decide whether or not to be checked.
- Pair programming sounds nice, but I have no wish to try it with a stranger on the internet.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement