makandra dev

Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...

github.com

Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema...

techblog.netflix.com

You login to a Linux server with a performance issue: what do you check in the first minute? uptime

Once Rails knows a given string is html_safe, it will never escape it. However, there may be times when...

postgresql.org

PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...

nateberkopec.com

rack-mini-profiler is a powerful Swiss army knife for Rack app performance. Measure SQL queries, memory allocation and CPU...

The nokogiri gem provides different packages for several platforms. Each platform-specific variant ships pre-built binaries of libxml2, e.g...

E-mails are usually encoded using Quoted Printable. Here is how to decode or encode such strings. You probably know...

makandra dev
stackoverflow.com

When there's a Gemfile.lock in your working directory that you cannot remove by either checkout, reset [--hard], stash, probably...

Lead by a discussion of this issue, I built in a middleware which answers those requests with [400] bad request...

stackoverflow.com

There are many solutions, but a very concise one is this: hash.merge!(hash) do |key, old_value, new_value|

You want to test your 1GE or 10GE internet uplink? We needed to ensure we have full 10GE to the...

When dealing with AR scopes, you can remove conditions, order, etc by using the unscope method. It is available on...

Rails 4 introduced raising an error on pending migrations. This is most annoying when you are crafting a migration but...

Starting with Rails 4.0, when you get an exception reported via the ExceptionNotification gem, you will only see a very...

github.com

Rails 5 will introduce ActiveRecord::Relation#or. On Rails 4 and 3.2 you can use the activerecord_any_of gem...

To safely transport an arbitrary string within a URL, you need to percent-encode characters that have a particular meaning...

You may encounter problems with passenger starting an application with an updated rails. If you find an error like this...

You can include files from app/assets or from the public folder with javascript_include_tag. The subtle difference that tells...

A word of caution There should rarely be a reason for you to split up config/routes.rb. If you need to...

github.com

MarcoPolo shows your app name and environment in your console prompt so you don't accidentally break production Officially supporting...

Here is how to start your Rails application to accept both HTTP and HTTPS in development. gem install passenger

makandra dev
bootswatch.com

Free Bootstrap theme resembling Material Design. Bootswatch offers Sass and Less files, so the theme can easily be integrated into...

The migration DSL now supports adding and removing foreign keys. They are dumped to schema.rb as well. At this time...