* Prefer compact_blank! to delete_if blank Rubocop suggested this. Why would I argue. * When sort_direction is anything other than asc or desc, remove it There is initializer code in the search/query classes that handles nil sort_direction by adding a default value, so deleting the sort direction is reasonable here. * Set a default sort direction for articles of :desc * Only sort if sort_direction and sort_by are present * Add test case for article search with invalid parameter |
||
|---|---|---|
| .. | ||
| article.rb | ||
| comment.rb | ||
| listing.rb | ||
| podcast_episode.rb | ||
| reading_list.rb | ||
| tag.rb | ||
| user.rb | ||
| username.rb | ||