Tutorials


The mysterious life of public, private, and protected in Ruby
It seems that there is nothing more that you can learn about access modifiers in Ruby. Public, private, and protected are well known among Ruby developers. I thought so too. However, I found a few things that are still valuable to learn and may be...

Manage Rails app business logic using ActiveInteraction gem | Shakacode
While working with Rails applications, developers are concerned about adding business logic in the right place. Developers have to ensure that the business logic is well understood, maintainable and readable as the application grows.To abstract an...

Integrate Sidekiq with Hanami Applications | Hanami Mastery
In the previous episode, I showcased the possible implementation of the Sitemap generation for your Hanami applications. If you're new to the channel, make sure you check that out as today I'll make a direct improvement on that topic.My sitemap ge...

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...