Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justalever/turbo_filter_quotes
turbo_filter_quotes
https://github.com/justalever/turbo_filter_quotes
hotwire-turbo rails
Last synced: 11 days ago
JSON representation
turbo_filter_quotes
- Host: GitHub
- URL: https://github.com/justalever/turbo_filter_quotes
- Owner: justalever
- Created: 2023-04-02T18:18:30.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-07T20:19:34.000Z (almost 2 years ago)
- Last Synced: 2024-10-09T13:04:33.679Z (3 months ago)
- Topics: hotwire-turbo, rails
- Language: Ruby
- Homepage: https://web-crunch.com/posts/hotwire-and-rails-data-filtering
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
![Let's Build with Hotwire and Rails - Quick Data Filtering](https://f001.backblazeb2.com/file/webcrunch/hotwire-data-filtering.jpg)
# Let's Build with Hotwire and Rails - Quick Data Filtering
Welcome to another edition of my Hotwire and Rails series, where I take you through a journey of creating old conventions that used to require JavaScript and bringing them to life using Hotwire and Rails.
This guide is a simple one aimed at showing foundational principles for using Hotwire. We'll build a simple database of quotes from the movie Dumb and Dumber and present simple filters to cycle through that data.
The filters toggle the order of different types of data related to a Quote model and then, upon click, will instantly sort themselves in ascending or descending fashion.
It's important to note that this functionality is completely possible with legacy Rails applications. Still, the main difference lies in the request cycle when a user might click a sortable link.
Additionally, we can now embed forms that render in place to edit specific quotes on the fly.
Hotwire brings us a lot of power which is very exciting to see as you begin to construct applications that used to take loads of JavaScript, JSON, and third-party libraries to get the job done.
- 📺 [Watch video](https://youtu.be/ThDpy4c0GdI)
- 📕 [Read blog post](https://web-crunch.com/posts/hotwire-and-rails-data-filtering)