Simon Chiucodewithrails.com·Aug 28, 2024How to save a recently viewed list of pages with Stimulus and localStorageCreating a "recently viewed pages" list can significantly enhance the user experience by providing easy navigation and a history of recently accessed content. Seeing how we are already using Rails, we are going to leverage Stimulus. Also, instead of ...757 readsRails BasicsRails
Hrishi Mittalhrishimittal.hashnode.dev·Jul 25, 2024How to build an image gallery in Rails with StimulusClick here to watch a video version of this tutorial. This lesson is from Full Stack Rails Mastery In this lesson, we’ll create an interactive image gallery for the product page using Stimulus. Here we have all the thumbnails of the product’s image...1 likeRails
Avi Flombaumcode.avi.nyc·Jan 25, 2024Turbo Frame Search FiltersA common pattern is having a search form that filters a list of items. That's what we're going to build now with a minimal amount of code using Turbo Frames and Stimulus. Here's what it will look like in the end. We've got a bunch of jobs, each with...6 likes·6.3K readsturbo frames
Avi Flombaumcode.avi.nyc·Jan 12, 2024Rails Nested Forms with Turbo StreamsA common UX pattern is to have a form with the ability to add and remove nested records. For example, a form for a blog post might have a section for adding tags. The user can add as many tags as they want, and remove tags they no longer want. For s...2 likes·1.9K readsnested forms
Arthur Arizaarthurariza.hashnode.dev·Sep 24, 2023Bringing Elegance to the Night: Implementing Dark Mode in Your Rails 7 App with Tailwind and Stimulus JSIn the ever-evolving landscape of web development, user experience remains a top priority. One key element of enhancing the user experience is the implementation of dark mode, a feature that has gained immense popularity in recent years. Dark mode no...1.0K readsRails
Phil Smyphilsmy.hashnode.dev·Jul 29, 2023Loading Dynamic Content on Opening Bootstrap Modals with Stimulus JSWhen working on a recent project for Zonmaster.com, I encountered a requirement that called for loading dynamic data into a Bootstrap 5 modal every time it was opened. By default, Bootstrap modals are rendered during the page load and remain static t...237 readsRuby on Rails
Phil Smyphilsmy.hashnode.dev·Jul 22, 2023How to Pass Data from a Rails view to Stimulus: A Simple GuideEveryone talks about the importance of pulling data from endpoints, but what if you already have your data on the page and want to pass it directly to your Stimulus controller? Here’s an efficient method of passing data to Stimulus! The Problem I hav...Rails
Ahmed Nadarahmednadar.hashnode.dev·Jul 10, 2023A Peek into Crafting Connectroots with Ruby on RailsIdeas come and go. Yet, a select few manage to take root in our minds, demanding our attention and action. To garner quick feedback, we need reliable tools—those simple to grasp, operate, and seamlessly navigate their ecosystem. A robust community of...Ruby on Rails
Nick K.nkokkos.hashnode.dev·Jun 27, 2023How to use tomselect javascript library to create and edit a"belongs_to :many relation" with Ruby on RailsImagine that you have a classic has_many :through relation where you need to select several records out of thousands. Your form should be using an html select tag which would prove problematic if you had to select, say 5 records, out of 50.000 or mor...578 readsRuby on Rails
Alexander PanovforRoyalZSoftwareroyalzsoftware.de·Mar 31, 2023How to build a reusable sortable table in Ruby on Rails with StimulusThis article is all about writing a sortable table with reusable software modules in Stimulus and the Ruby on Rails backend too. The result and its limitations We will pass a certain sort key via a query parameter to the backend. A query parameter ...915 readsRuby