We have a new gem Minidusen which extracts Dusen's query parsing and LIKE query functionality. Minidusen can no longer...
If you were using Dusen for its query parsing and LIKE queries, we recommend to migrate to Minidusen, which extracts...
Sometimes you want to test migrations with production or staging data. Dumping single tables makes sense if a complete dump...
Resources Rails Guide: Internationalization API Guide to localizing a Rails application Locale-aware helpers in ActionView::Helpers::NumberHelper
PostgreSQL, unlike MySQL, treats strings as case sensitive in all circumstances. This includes comparison with = and LIKE collision detection in...
When building a web application, one is tempted to claim it "done" too early. Make sure you check this list...
Apparently you can pash a second scope to a hash-condition and the whole thing will be evaluated as a...
This is quite an edge case, and appears like a bug in Rails (4.2.6) to me. Update: This is now...
You can download .gem files using gem fetch: gem fetch activesupport consul This will produce files like active-support-5.0.0.gem and consul-0.12.1.gem...
to create a Gallery that has a name and has_many :images, which in turn have a...
ActiveRecord offers an explain method similar to using EXPLAIN SQL statements on the database. However, this approach will explain all...
Instead of using this hack you might want to use MariaDB 10.x which can work with both old and...
When creating an index using CREATE INDEX, Postgres will create a B-Tree type index by default. The B-Tree...
You can find out about disk space usage of all tables within your database by running this: SELECT table_name...
If you want to perform a failover on another haproxy backend server this is the way you should do it...
When full text search is overkill and like queries do not deliver this might be an approach you could try...
Don't write resources :people, :concerns => :trashable Write resources :people do concerns :trashable end Why Writing a controller...
If you are on a Linux shell and want to open a file with whatever default application is configured for...
TL;DR There are three dimensions you can control when scoping routes: path helpers, URL segments, and controller/view module.
Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...
Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...
Cause logstaglia is so cool you may want to record a video. We're lucky: Logstalgia has a parameter for...
SELECT pg_database.datname as "database_name", pg_database_size(pg_database.datname)/1024/1024 AS size_in_mb FROM pg_database ORDER...
PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...