* First draft - all the big changes * Changing some more references to 'internal' * Relocate internal request tests to admin * Relocate internal system tests to admin * Fix trailing space * Test fix * Move queries from internal to admin * Docs updates * Rename internal stimuls controllers to admin (plus docs) * Rename admin layout * Fix routing after rebase * Fixes for latest added admin interfaces * Serviceworker ignore paths
24 lines
999 B
Markdown
24 lines
999 B
Markdown
---
|
|
title: Admin Search
|
|
---
|
|
|
|
# Admin Search
|
|
|
|
For admin views that need to take advantage of searching and filtering, we've
|
|
chosen to use [Ransack][ransack].
|
|
|
|
Ransack is a Ruby gem that makes searching relatively painless. It has excellent
|
|
documentation, but if you're looking for an example of how it's being used on
|
|
Forem, we've implemented it to help searching and sorting user reports.
|
|
|
|
The view responsible for managing user reports can be found at
|
|
`localhost:3000/admin/reports` and Ransack can be seen in use on the index
|
|
action of the [`admin/feedback_messages_controller`][feedback_messages].
|
|
|
|
For Forem, Ransack is being used exclusively in admin, for search problems in
|
|
other parts of the app we use [Elasticsearch][elasticsearch].
|
|
|
|
[feedback_messages]:
|
|
https://github.com/forem/forem/blob/4e41e4a2ac893fa2a6c36990cfe475858ffb086a/app/controllers/admin/feedback_messages_controller.rb#L4
|
|
[ransack]: https://github.com/activerecord-hackery/ransack
|
|
[elasticsearch]: /backend/elasticsearch
|