PostgreSQL offers three character types for your columns: character varying(n) (also called varchar or just string): Contents are limited...
RubyMine has a HTTP Client that can be useful to test web APIs. Just create a .http scratch file an...
In a web application you sometimes have tasks that can not be processed during a request but need to go...
If you render markdown from user input, an attacker might be able to use this to inject javascript code into...
Speaker today is Henning Koch, Head of Development at makandra. This talk will be in German with English slides.
We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...
tl;dr Don't forget require 'English' if you use a named global such as $LAST_MATCH_INFO. Otherwise this...
We use the whenever gem to automatically update the crontab of the servers we deploy to. By default, whenever will...
One of the earliest pieces of wisdom we are given as programmers is to not write duplicate code: Don’t...
This seems to be obvious, but you can expect Rake tasks to be called in RSpec. it 'deletes all Users...
Using git fixup helps you to speed up appending changes further back in the git history of your feature branch...
To make CSS rules dependent on the screen size, we use media queries: @media (max-width: 500px) { // rules for screen...
When you have many changes, and you want to spread them across different commits, here is a way to stage...
The linked GitHub repository is a bit like our "dev" cards deck, but groomed from a single person (Josh Branchaud...
In Active Record you can use named bindings in where-conditions. This helps you to make your code more readable...
With puma you can have concurrent requests. There are two concepts on how Puma can handle two incoming requests: Workers...
Test-Driven Development (TDD) in its most dogmatic form (red-green-refactor in micro-iterations) can be tedious. It does...
Simplecov is a code coverage tool. This helps you to find out which parts of your application are not tested...
A recent patch level Ruby update caused troubles to some of us as applications started to complain about incompatible gem...
Turns out, Cucumber::MultilineArgument::DataTable#diff! caches some stuff. Code of the following form will not work as intended:
Embedding videos on a website is very easy, add a tag to your source code and it just works...
By default, Devise redirects to a sign-in form when accessing a route that requires authentication. If for some reason...
Code comments allow for adding human readable text right next to the code: notes for other developers, and for your...
In applications without a sign-up, user accounts are usually created by an admin. This imposes two challenges: