Tutorials

Stateless Forms with the Rails Attributes API: No Active Record? No Problem!
One of the ironies of working with Ruby on Rails is that making a feature do less often results in more work. For a great example of this, consider the ingredients that go into a standard Rails form: route, controller, ERB template, Active Record ...


Fetching the top n per group with window functions
Have you ever needed to get the most recent N posts for each user in rails, but didn’t know how to do it without using map?Or maybe something similar like:The first or last X comments for each postThe first or last Y payments for each customerThe ...

Thinking in Hotwire: Progressive Enhancement | Boring Rails: Skip the bullshit and ship fast
There are many tutorials about how to get started with Hotwire and how to use the individual pieces. But one thing that took me a while to grasp was how to “think in Hotwire”.Hotwire itself is an overarching concept (HTML-over-the-wire) and you’ll...

Including Associated Data In A Sinatra API Response
A scrum/kanban (we'll call it scrumban from here on out) board is used by development teams to provide a way to break down a project into smaller chunks of work that are able to be implemented in 2-to-4-week sprints. The scrumban board typically c...




Generate Sitemaps for Hanami applications! | Hanami Mastery
I have a sample Hanami application here which allows me to show the content of messages in the browser, by switching the dynamic segment in the URL - an ID of the message. I can also list them together under the /messages path if I remove the ID c...