To reload a single-item association in Rails 5+, call #reload_ : post.reload_author In older Railses you can say
When projects run for many years, they require special regular maintenance to stay fresh. This kind of maintenance is usually...
There are two ways to lock a user in devise. Using the lockable module Customizing the user account status validation...
When you are using lambdas in RSpec to assert certain changes of a call, you know this syntax: expect { playlist.destroy...
This repository was created with the intention of helping developers master their concepts in JavaScript. It is not a requirement...
Setting array columns When using PostgreSQL array columns, you can set an array attribute to a value with square brackets...
Percent Notation We already know that that we can create strings using the percent notation: %(<foo="bar's ton">) is...
It is very common to parse dates from strings. It seems obvious to use Date.parse for this job. However this...
Mobile Chrome and Safari support the "web share API" which allow you to use the native share functionality of an...
When debugging your application, you will come across objects created by some gem or framework. You don't have the...
Scrolling overflowing elements with JavaScript HTML elements with overflow-y: auto or overflow-y: scroll will get a scrollbar when...
Phusion Passenger changed the way how it gets restarted several times. Through the project's history, these all were valid...
For Sidekiq to be able to retry your jobs it has to be able to catch errors that occur while...
Cross-Site Request Forgery (CSRF) is an attack pattern for websites. A CSRF attack is usually relevant in a...
A JavaScript error in an E2E test with Selenium will not cause your test to fail. This may cause you...
Geordi provides a pretty neat way to generate beautiful commit messages according to your stories in Linear: geordi commit
Geordi's cucumber command has a --rerun option that reruns failing tests the given number of times. Usage: geordi cucumber...
...HTML's accepts a single file. You can allow multiple files via . But sometimes, selecting multiple files is not enough...
Let's say you have a gem which has the following module: module SuperClient def self.foo 'Foo' end
We want to keep a changelog for all gems we maintain. There are some good practices for writing a changelog...
Most forms have a single submit button that will save the record when pressed. Sometimes a form needs additional submit...
Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a...
In general, the tracker should always be the definitive source of truth of what needs to be done as part...
In a project team for a bigger project people have several roles: Developer: at makandra Project lead: at makandra