Sharing Sessions Between Rails and Node.js Using Redis

I’ve been spending my free hours lately working on a realtime multiplayer game. In building the game, I decided to build the front-end using Ruby on Rails with the actual game implemented using Node.js, specifically using Socket.IO. One of the first major challenges I encountered with this approach is the need to share session data[…]

Implement Multiple Table Inheritance Into Your ActiveRecord Models

This past week, I released my first ever Ruby gem: multiple_table_inheritance. Multiple Table Inheritance is an ActiveRecord plugin designed for Rails 3.0+ designed to make table-level inheritance easier than ever. Imagine you have an application that needs to maintain a list of employees. You’ll probably start out with a few columns including first name, last[…]

Rotating Paperclip Image Attachments in Rails

With users uploading personal photos, especially ones coming their phones that capture landscape photos in portrait mode and vice versa, one of the things I wanted to integrate into Black Book Singles is the ability to rotate photos. Since I’m using the Paperclip gem, this should be relatively easy to achieve through a custom attachment[…]