JSON API Helpers for API Testing in Rails using Airborne

I am a huge fan of the Airborne gem for testing APIs. Airborne uses rest_client to make HTTP requests and provides the following properties for use in your tests. response - The HTTP response returned from the request headers - A symbolized hash of the response headers returned by the request body - The raw HTTP body returned from the request json_body - A symbolized hash representation of the JSON »

Index Your Foreign Keys

We add indexes to our database in order to speed up read operations. Basically, an index is a sorted copy of a particular set of columns the database uses to quickly look up the attributes of another table, most commonly, foreign keys of relations. There are several ways this can actually be implemented on the database; essentially, we tell the database which values we’ll be looking up most often and »

ActiveRecord Associations & You

I love abstraction. It’s great to compartmentalize complexity and keep your application modular. SQL is not that. Relying on SQL strings in your code ties your implementation directly to the type, structure, and even the version of your database. ActiveRecord (the ORM behind Rails) is great for letting us focus on our application and not worry so much about the database particulars. However, understanding »

Better Rails Debugging with better_errors and jazz_hands

Go beyond the stacktrace with 2 gems that grant you debugging superpowers. Better Errors Does this screen look familiar? Do you notice anything wrong with this picture? That is correct, that is the default Rails error page and you are absolutely right, it is completely hideous and hurts to look at. It is begging to be improved. By answering these questions you have already proven yourself to »