Git commits should be very deliberate, and only contain changes that you really want to be in there. In order...
When you have two models in a has_many, has_one or belongs_to association, the :inverse_of option in...
simple_format ignores Rails' XSS protection. Even when called with an unsafe string, HTML characters will not be escaped or...
Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...
Tempfiles get deleted automatically With the the ruby Tempfile class you can create temporary files. Those files only stick around...
In a nutshell: Use git rebase --onto target-branch source-commit target-branch means "branch you want to be based...
When deploying, Capistrano puts a REVISION file into your application's release directory. It contains the hash of the commit...
Sometimes you need to remove high Unicode characters from a string, so all characters have a code point between 0...
Recent rails security updates have shown that people make incorrect assumptions about the possible contents of the params hash.
If you're suffering from a huge de.yml or similiar file, cry no more. Rails lets you freely organize your...
Localizing a non-trivial application can be a huge undertaking. This card will give you an overview over the many...
When requests arrive at the application servers simultaneously, weird things can happen. Sometimes, this can also happen if a user...
By default, Google Analytics tracks the current URL for every request. Sometimes you will want to track another URL instead...
An association defined with has_many :through will return the same record multiple times if multiple join models for the...
You can change which branches will be pushed when saying git push. Our recommendation is to set it to current...
The following two hints are taken from Github's Ruby style guide: If your regular expression mentions a lot of...
When you are calling a method that may raise an exception that you don't care about, you might think...
If your project manager wants to do gatekeeping on a project, as a developer you need to follow the following...
When your model is using a callback like before_save or before_validation to calculate an aggregated value from its...
When selecting records in a date range, take care not to do it like this: start_date = Date.parse('2007-05...
Basically, you now need to know if your project uses a "real" time zone or :local, and if config.active_record.time_zone...
By default, Rails views escape HTML in any strings you insert. If you want to insert HTML verbatim, you need...
While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals...
Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...