github.com

Installation differs slightly from older versions, please check the README.

Icon fonts like Font Awesome are infinitely scalable, look great on high-DPI displays and will give your app a...

Under certain (unknown) circumstances, Rails will give localized files an invalid content-type in the Response header. For me, after...

ActiveModel::Errors is used to handle validation errors on Rails objects. If you inspect an instance, it feels like a...

If you require your Rails models manually, pay attention to the path you use. Unless you have...

If your application has forms to edit string fields, you probably want to strip the entered values (remove whitespace from...

In a Rails application, *_spec.rb files get special treatment depending on the file's directory. E.g. when you put a...

makandra dev
github.com

Richard Powell presents a collection of CSS styling advice that's mainly taken from SMACSS. Although at makandra we're...

Geordi now supports our solution for running Selenium tests without having Firefox or Chrome windows popping up all over your...

Ruby's mathn library changes Fixnum division to work with exact Rationals, so 2 / 3 => 0 2 / 3 * 3 => 0...

If some of your JavaScripts fail on Internet Explorer, but only in staging or production environments, chances are that JavaScript...

Never ever declare your associations with a string, especially when doing metaprogramming. A common mistake is something like # WRONG

There is no reason to leave trailing whitespace characters in your project's files, so don't add any.

The ActionMailer in Rails 2 depends on a buggy version of TMail, which sometimes inserts a blank line into the...

simple_format ignores Rails' XSS protection. Even when called with an unsafe string, HTML characters will not be escaped or...

Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...

When you get an error like this: Invalid gemspec in [/opt/www/foo-project.makandra.de/shared/bundle/ruby/1.8/specifications/carrierwave-0.6.2.gemspec]: Illformed requirement ["# 1.1.4"] ... the machine's Rubygems needs to...

We frequently use the handy Paperclip Gem to manage file attachments. If you need to move the files from local...

rubyforge.org

Under certain circumstances gettext_i18n_rails will hit a near-infinite loop. This occured in Rails 2.3.5 with Haml 3.0.18...

If you have an html_safe string, you won't be able to call gsub with a block and match...

If you want to update some records with boolean fields in a migration, always remember to set your values with...

In a nutshell: return statements inside blocks cause a method's return value to change. This is by design (and...

Tempfiles get deleted automatically With the the ruby Tempfile class you can create temporary files. Those files only stick around...

makandra dev

This article describes how to reset MySQL's or MariaDB's root password on your workstation. It's meant for...