Serving Custom JSON Responses With ActiveModel::Serializers

These days, there are so many different choices when it comes to serving data from an API. In many cases, you just want to bring something to market as fast as you can. For those times, I still reach for Ruby on Rails.

When building an API in Rails, you need a good solution for structuring your JSON. ActiveModel::Serializers (AMS) is a sensible choice. It's powerful alternative to jbuilder, rabl, and other Ruby templating solutions. It's easy to get started with, but when you want to serve data that quite doesn't match up with the way ActiveRecord (AR) structures things, it can be hard to figure out how to get it to do what you want.

In this post, we'll take a look at how to extend AMS to serve up custom data in the context of a Rails-based chat app.

Read More

Wrapping Your API In A Custom Ruby Gem

In the modern web, API-based projects are becoming the norm. Why? For one thing, APIs are necessary to serve Single Page Applications, which are all the rage right now. From a business standpoint, APIs give companies a new way to charge others for access to their data. If you are part of a company that offers such a service, a great way to generate interest in your API is to offer a Ruby gem that makes fetching and consuming your data easy for Ruby developers.

In this article, we'll take a look at how to wrap an imaginary API in a new Ruby gem and share it with the world.

Read More

SOLId Design Principles

If you're a professional developer and don't know about SOLid, consider
your education incomplete. SOLid is a mneumonic acronym describing 5
prinicples that are particularly handy when designing complex object
oriented systems.

Read More

Hackfest: API Mashup Smashup

What: Haxorz, Pizza, Beer
Where: Quick Left HQ
Date: Wednesday, Jun. 29th
Time: 6pm -> well, you know...

Continuing our monthly Hackfest series, Quick Left is hosting an API Mashup Smashup. As hackers we have long practiced the precise art of API weaving to construct fancy Internet creations. Sometimes for good, sometimes for profit, and always for the lulz; and now for PRIZES!

Grab that swank new Chromebook, a couple of your dev friends, and come be a part of the biggest Hacking Event in Boulder... on that particular night.
Can't make it to our office? No worries, submissions are handled with github pull requests so you can participate remotely! Join our IRC channel #QuickLeft on Freenode, and stay tuned to

Of course contest participation is not required, but if you want to throw down be sure to hone your curl skills, sharpen your favorite XML parser (eww), and bring your A(PI) game.
More details and rules to be revealed at contest start: 6pm Mountain Time, Wednesday the 29th.

Read More