Sometimes you want to test migrations with production or staging data. Dumping single tables makes sense if a complete dump...

To check the currently running PG version from your Rails application (e.g. Rails console on your production server), simply do...

PostgreSQL, unlike MySQL, treats strings as case sensitive in all circumstances. This includes comparison with = and LIKE collision detection in...

Is your application doing something expensive every few seconds? Maybe an animated slider that rotates images? Maybe you are updating...

Here is a symbol of an eight note: ♪ Its two-byte hex representation is 0x266A. This card describes how to...

When building a web application, one is tempted to claim it "done" too early. Make sure you check this list...

So you downloaded a theme for Chrome a while ago and don't remember which one it is?

tenderlovemaking.com

You can define methods using def or define_method. In the real world, there is no performance difference.

til.hashrocket.com

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...

Processes in Linux might be put into Swap ("virtual memory") occasionally. Even parts of a single process might be removed...

jakearchibald.com

The way that Javascript schedules timeouts and promise callbacks is more complicated than you think. This can be the reason...

makandra dev

Have you ever mistaken one Rails environment for another? The attached helper will help you to never do it again...

to create a Gallery that has a name and has_many :images, which in turn have a...

jqueryui.com

UI sortable helps reordering items with drag 'n drop. It works quite fine. Proven configuration for sorting table rows

The attached ImageLoader helper will start fetching an image and return an image that is resolved once the image is...

When you run rake db:rollback and nothing happens, you are probably missing the latest migration file (or have not...

github.com

Adds missing native PostgreSQL data types to ActiveRecord and convenient querying extensions for ActiveRecord and Arel for Rails 4.x...

guides.rubyonrails.org

ActiveRecord offers an explain method similar to using EXPLAIN SQL statements on the database. However, this approach will explain all...

blog.skylight.io

Helix allows you to implement performance-critical code of your Ruby app in Rust, without requiring glue code to bridge...

makandra dev
github.com

This gem gives you a rake task db:seed:dump do create a db/seeds.rb from your current database state.

Instead of using this hack you might want to use MariaDB 10.x which can work with both old and...

OAuth requires a set of params to be carried along requests, among which a nonce. Some libraries pass these along...