Featured on the JRuby blog

Posted on December 6, 2011

Hey y'all this is a bit outdated, but I figured it should be posted here anyway. Me + Gracious Eloise were featured on the JRuby blog. Check it out here!

Read More


The Power of JRuby

Posted on November 14, 2011

I hesitated about using JRuby at first. I spend days beefing up on Java, which I hadn't used in years. Even though I had been using Ruby on Rails for about a year, I felt more intimidated by JRuby than going back to Java. To be fair, the project I was working on involved integrating with complicated, legacy code. I started from a place of FUD. It took me fighting with Spring MVC to get it to return JSON without a view to say "Fuck it" ...

Read More


Stubbing Backbone.js fetch with Jasmine & Sinon.js

I needed to stub out a Backbone collection's fetch method and make it return success. I'm using Jasmine BDD for the testing framework and Sinon.js for stubbing the methods. Here's how I did it: (more…)

Read More


Validating a polymorphic association for a new record

Posted on September 30, 2011

Currently, in Rails, if you have a validates_associated on a model with accepts_nested_attributes_for, it will fail when creating a new record. (It fails because the foreign key is nil ... because the object doesn't exist yet.) Normally, using inverse_of solves this problem. However, with polymorphic associations, this doesn't work. What would the point of defining the inverse_of a polymorphic object when polymorphism allows the associated ...

Read More


Restoring my dev machine from a Time Machine backup

In what turned out to be the second worst news of the day, I found out my computer was stolen from our office. (The worst news came in the form of a realization that I was not going to get a cab and instead had to subway it home with a 10 pound box of frozen meat, a new laptop, my big-ass purse, and a bag containing 3 pound ankle weights, 2 pound wrist weights, and foam roller. It was awesome.) Fortunately, I'm anal (and lucky that my Time ...

Read More