Should Administrate handle request parameters differently?
(Bringing here a comment that I left at https://github.com/thoughtbot/administrate/pull/1773#discussion_r510007829, for visibility and discussion.)
Search params are sanitized at the bottom (templates/helpers), with information about what's allowed flowing top-to-bottom
- Dashboard/template figures out which params it allows.
- It renders partial and tells it "please allow these params along with those you allow"
I wonder if this should be sanitized a the top (the controller), with this info flowing bottom-to-top:
- Dashboards need to publish which params they allow
- Controller asks for lists, then sanitises params before rendering the top template.
- Templates don't need to know about sanitising.