Advertisement
codemonkey

Homework 2-2

May 25th, 2014
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. 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.
  2.  
  3. 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