Our great sponsors
-
beast_mode
100% server-side rendered faceted search UI demo. Featuring StimulusReflex and All Futures.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
You can view the finished product on Heroku, or find the full source on Github.
We’ll be building a simpler application, moving through the implementation step-by-step, but the Beast Mode codebase was vital as I began thinking about how to solve this problem. Reviewing that code base is highly recommended as you begin thinking about how to build more scalable, production-ready code with StimulusReflex.
Prior to Rails 6, this could have opened up our application to SQL injection; however, since Rails 6, Rails will raise an error automatically if anything but a table/column name + a sort direction are passed in to order.
Today we’re going to use Ruby on Rails and StimulusReflex to build a table that sorts itself each time a user clicks on a header column.