Setting array columns When using PostgreSQL array columns, you can set an array attribute to a value with square brackets...
When debugging your application, you will come across objects created by some gem or framework. You don't have the...
Phusion Passenger changed the way how it gets restarted several times. Through the project's history, these all were valid...
In this example we assume that not only the storage gem changes but also the file structure on disc.
Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...
If you use transactional_fixtures or the database_cleaner gem with strategy :transaction, after_commit callbacks will not be fired...
If validations failed for a record, and you want to find out if a specific validation failed, you can leverage...
Flexbox is awesome. Most of it even works in IE11, but flex: 1 won't work reliably in Internet Explorer...
Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a...
At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads...
Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...
Background information about session storage in Rails Rails has a default mechanism to store the session in the CookieStore. This...
Here is how to model basic logic in media queries. AND With keyword and. # Target viewport widths between 500 and...
Since late 2015, all major browsers (still excluding Firefox) support pointing device media queries. These can be used to distinguish...
When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...
Create a user without password (recommended) Replace newuser with your desired username: mysql -uroot -p CREATE USER 'newuser'@'localhost' IDENTIFIED...
Using the JS fullscreen API is painful because all browers use different methods and events and you need to use...
When your application is running on a multi-server setup, application logs are stored per server (unless you choose a...
You know that you can use jQuery's text() to get an element's contents without any tags.
When you have a large PG database, you may want to find out which tables are consuming the most disk...
The attached article explains options you have to store the order of items in a database table. The simplest solution...
Don't sum up columns with + in a sql-query if NULL-Values can be present. MySQL and PostgreSQL cannot...
geordi delete_dumps [directory] Recursively search for files ending in *.dump and offer to delete those. When no...
You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...