docbrown/app/services/search
Daniel Uber 060e426389
validate sort direction (#17439)
* 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
2022-04-27 08:59:13 -05:00
..
article.rb validate sort direction (#17439) 2022-04-27 08:59:13 -05:00
comment.rb Cleanup search classes and serializers (#13645) 2021-05-05 09:20:59 -04:00
listing.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
podcast_episode.rb Cleanup search classes and serializers (#13645) 2021-05-05 09:20:59 -04:00
reading_list.rb Ensuring reading list excludes unpublished articles (#15490) 2021-11-24 13:22:26 -05:00
tag.rb Added "Tags" category to search results (#16265) 2022-01-26 20:51:15 +03:00
user.rb Remove unused methods from User (#16616) 2022-02-18 09:02:17 +07:00
username.rb Cleanup search classes and serializers (#13645) 2021-05-05 09:20:59 -04:00