While you usually do not need a Content-Type on GET request (which have a blank body), an external API...

relishapp.com

You can configure RSpec 3.3+ to raise an error when attempting to stub or mock a non-existing method. We...

bugs.ruby-lang.org

This is basically Ruby-native syntax for andand.

Our applications not only need to be functional, they need to be fast. But, to quote Donald Knuth, premature optimization...

github.com

When a method has keyword arguments, Ruby offers implicit conversion of a Hash argument into keyword arguments. This conversion is...

This is a guide on how to effectively use Git when working on a feature branch. It is designed to...

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

bibwild.wordpress.com

While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the...

digitalocean.com

I recommend install Node.js using nvm. This way you can have multiple Node versions in your ~/.nvm. You also won...

It smells. Rethink your code design. Code example with makandra/has_defaults: class Post < ActiveRecord::Base has_defaults tags: [] # field in db...

hacks.mozilla.org

Unfortunately, Web APIs haven’t provided the functionality to copy text to the clipboard through JavaScript, which is why visiting...

Spreewald comes with a selector_for helper that matches an English term like the user's profile into a CSS...

On Ruby 1.9+, standard ruby character classes like \w, \d will only match 7-Bit ASCII characters: "foo" =~ /\w+/ # matches...

If you'd like to preview the crontab that whenever will deploy, run the following: bundle exec whenever

Each time thin boots, it prints a boot message : Thin web server (v1.6.3 codename Protein Powder) Maximum connections set to...

makandra dev

tig is a command line explorer for Git that is just awesome. Install via apt-get or brew. Handy commands...

Jasmine comes with two matchers that test for equality. The first is toBe: expect(first).toBe(second) toBe passes when...

jasmine.github.io

The easiest way to freeze or travel through time in a Jasmine spec is to use the built-in jasmine.clock...

If you are writing any amount of Javascript, you are probably using closures to hide local state, e.g. to have...

In Capistrano 2, directories in shared_children used to be symlinked to the shared directory during the finalize_update task...

pivotaltracker.com

The team is responsible for building great software—that’s it. It’s the only thing the team is responsible...

leomayleomay.github.io

Your after_commit callbacks will not know about changes, as Rails discards them when committing. The linked article shows a...

Large projects usually have large test suites that can run for a long time. This can be annoying as running...