If you need to enable NewRelic monitoring on certain machines within the same Rails environment, a simple solution is to...

Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is...

It is good programming practice to Don't Repeat Yourself (or DRY). In Ruby on Rails we keep our code...

So you client has asked you to implement a row of buttons to like the URL on Facebook, Twitter and...

makandra dev
github.com

Chrome extension that shows all info from your rails log (like parameters, response times, view rendering times, DB requests) inside...

stackoverflow.com

If you want to have routes that are only available in tests (e.g. for testing obscure redirects), you can use...

Working with lists in Javascript is painful because the native Array class is so poorly designed. One way to reduce...

Using text-transform: uppercase - especially on form labels - can cause you serious headaches in Selenium tests. Sometimes the web driver...

makandra dev
compass-style.org

Since we are migrating from our homegrown mixins.sass and helpers.sass to Compass, here is a list of all the mixins...

github.com

The asset pipeline (which is actually backed by sprockets) has a nice feature where templates ending in .jst are compiled...

When two elements with display: inline-block are sitting next to each other, whitespace between becomes a space character.

fortawesome.github.io

A list of FontAwesome icons in the form of copyable Unicode characters or HTML entities. You might prefer to use...

In order to keep the controllers directory tidy, we recently started to namespace controllers. With the :controller option you can...

apidock.com

When you're writing migrations that do more than changing tables (like, modify many records) you may want some output...

snook.ca

CSS3 comes with new unit rem. It works like em but it is always relative to the element instead of...

stackoverflow.com

I had some problems with Git and the file spec/fixtures/ČeskýÁČĎÉĚÍŇÓŘŠŤÚŮÝŽáčďéěíňóřšťúůýž. After pulling the latest commits, it would show that...

When two classes implement the same behavior (methods, callbacks, etc.), you should extract that behavior into a trait or module...

In Rails 5 you can say: ApplicationController.render( :template => 'users/index', :layout => 'my_layout', :assigns => { users: @users } ) If a Request Environment is...

Simply give the select helper an option :disabled, passing either a single value or an array. You need to specify...

Exception notifications contain a lot of information: Backtraces, HTTP headers, etc. exception_notification tries its best to format this wall...

For websites that don't do JavaScript rendering on the client, it's best practice to put script tags at...

makandra dev

Using CSS sprites for background images is a technique for optimizing page load time by combining smaller images into a...

stackoverflow.com

The ipad onscreen keyboard changes position:fixed style to position:static that misplaces those elements and you'll have problems...

makandra dev

Next time you have to do more than trivial CSS changes on a project, you probably want to have live...