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

We're using Middleman for some static sites like our blog. Despite being very similar to Rails, Middleman does not...

makandra dev
piwik.org

Piwik is the leading open-source analytics platform. As such, it is an alternative to Google Analytics. Since it is...

When your controller action raises an unhandled exception, Rails will look at the exception's class and choose an appropriate...

Resources Rails Guide: Internationalization API Guide to localizing a Rails application Locale-aware helpers in ActionView::Helpers::NumberHelper

makandra dev

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

tenderlovemaking.com

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

This is quite an edge case, and appears like a bug in Rails (4.2.6) to me. Update: This is now...

makandra dev
gist.github.com

When ActiveRecord child objects are autosaved in Rails.

Note: This applies to plain Ruby scripts, Rails does not have this issue. When you work with Ruby strings, those...

makandra dev
dev.mensfeld.pl

Ruby 2.3.0 has been around since end of 2015. It brings some pretty nice new features! Make sure to read...

mitrev.net

As announced before, Ruby has introduced a safe navigation operator with version 2.3.0. receiver&.method prevents NoMethodErrors by intercepting method...

github.com

Ever needed to use a global variable in Rails? Ugh, that's the worst. If you need global state, you...

makandra dev

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

As your Rails project grows, you will accumulate a number of small patches. These will usually fix a bug in...

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

jquery.com

Since jQuery 3 saw it's first release candidate today, the links has a list of (breaking) changes.

When you have a localized website, you may want to redirect users to their preferred language when they visit the...

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

makandra dev

If you're trying to searching or installing packages via pkg the your repository data might be broken. If pkg...

makandra dev

When dealing with time zones in Rails, there is one key fact to keep in mind: Rails has configurable time...