Making Browsers Play Nice With Thin Fonts

Thin fonts are oh-so-cool nowadays. The thinner, the trendier. But browsers have their own ideas when it comes to rendering font thickness. How to make everyone play nice?

An Awesome Rails Validations Trick

Here's a cool Rails validation trick to add to your arsenal. Enjoy.

Yodlee and Rails Implementation, Part 5: Retrieving Data

In this last post of the Yodlee-Rails series, we put all the remaining pieces together and retrieve details bank and credit card transaction data for our users.

ActiveRecord How-To: Multiple Aggregate Counts Grouped by Day

How to aggregate and group multiple columns within a single table for metric views.

Yodlee and Rails Implementation, Part 4: User Management

In this post of the Yodlee-Rails series, we learn how to manage users on Yodlee. We also cover how to auto-create and destroy Yodlee users as users join and leave your app.

Yodlee and Rails Implementation, Part 3: Bank Login Forms

We continue the series by learning how to apply object-oriented principles to effectively and efficiently render login forms from hundreds of banks.

Yodlee and Rails Implementation, Part 2: The Banks

In this post, we look at interacting with banks and other services via the Yodlee API in preparation for scraping user credit card and bank statement data.

Yodlee and Rails Implementation, Part 1: Getting Started

Yodlee is a service like no other: it allows apps to aggregate consumer data from across the financial spectrum. In this first post of the series, we begin creating a Yodlee Rails app using best practices.

The New Yodlee REST/JSON API and Rails

On October 21st, Yodlee released a new REST/JSON API to replace its current SOAP/XML API. Here is a breakdown of the changes.

Fixing a 'Connecting to database specified by database.yml' Loop

Occasionally an app is re-deployed but won't start. You open the log and you see 'Connecting to database specified by database.yml' being outputted. Here's how to fix that.

Meet Chunk and Partition, the Enumerators You're Not Using Enough Of

Chunk and Partition are two incredibly useful enumerators for grouping items. We'll explore them in this post, show an example of where they shine, and also look at some other grouping methods.

Clean OAuth for Rails: An Object-Oriented Approach

While Ruby's OAuth gems do go a long way towards making OAuth implementation with Rails a pain-free process, the standard method of implementation rapidly breaks down on a full scale production app when User validations and logic begin conflicting with the information we receive from OAuth.

In this tutorial, we will take an object-oriented approach, separating logic for OAuth users from logic for non-OAuth users to create a robust and stable OAuth implementation that is clean, sturdy, and will not break down as you add functionality to your app's user objects.

Note: This tutorial is intended for programmers who have implemented OAuth for Rails before and are looking for a better way to do so. It is not a beginner's tutorial. It assumes the reader already has knowledge of the OAuth gems and how to integrate them into a Rails app.

A Rant on the Misuse of Instance Variables

When are instance variables the right tool, and when are they not? What are the alternatives? And what does an overabundance of instance variables mean? Here are my thoughts on clean object modeling in Ruby.

Rails Nested Forms using jQuery and SimpleForm

Rails comes with built-in support for allowing a model to accept "nested attributes": where one resource can accept attributes for another (sub)resource. It works out of the box for when a form needs to support just one record of the nested resource. But what if a form needs to accept unlimited records of the nested resource?

Here is an easy jQuery-only solution for creating unlimited nested forms.

Passing Arguments to a Rails Rake Task

Ever had to pass command line arguments to Rake task? Here's the syntax.

Multitenancy in Rails

If you are a Rails developer, it is only a matter of time until a client approaches you to build a multitenant SaaS app.

Multitenancy applications are unique in the respect that data between tenants needs to separated by a virtual iron wall. In this post I will discuss the three common solutions for creating multitenant apps in Rails, what I dislike about each one, and I'll propose a new implementation which is simpler, cleaner, and very effective.

The Yodlee API and Rails, Part 1: Starting the Conversation

Dubbed by CNN the "800-pound gorilla of the internet", Yodlee is used by banks and financial institutions worldwide to aggregate consumer data from across the financial spectrum: it gathers and collates everything from student and mortgage loans, to credit cards, 401(k), checking, and savings accounts.

The Yodlee API has become something of a hobby for us at NYC Dev Shop. In this tutorial, I will walk you through the process of setting up a working API connection between your Rails app and the Yodlee API service.

Elegant Titles and SEO Meta Tags in Rails

One of the best things about Rails is its powerful templating system which logically split the view into layouts, views, and partials, and makes creating great sites a snap. But this template approach makes it difficult to create dynamic <title> </title> tags, as you can't easily alter your layout file from within a view.

In this tutorial, we explore an elegant way of rendering dynamic title tags and SEO meta tags on a page-by-page basis, while optionally allowing the tags to fall back on pre-defined defaults when left unspecified.