Category Archives: mongoid

Composition Of Responsibility vs Interface Implementation

This started out a comment in a Google+ stream, which is in response to the brujahahahahalols that have been going around concerning ActiveRecord, FubuMVC and Rails. I’m not defending any of these posts or perspectives. I have my own opinions … Continue reading 


Making Mongoid Play Nice With Backbone.js

Backbone has some great features that make it dirt-simple to integrate with a Rails back end. For example, the Backbone models have a .fetch(), .save() and .destroy() method on them. These methods make a call back to your server, based … Continue reading 


Partially Solving The Date Validation Deficiency Of Rails 3 And Mongoid 2 Models

A while back, I posted a question on stack overflow on how to properly validate a date input from a text field input, without throwing exceptions when the string provided is not a valid date. ┬áThe core of the problem … Continue reading 

| Leave a comment

Mongoid: Polymorphic Find Or Create New On Embedded Document Collections

In the old v2.0.beta.20 version of Mongoid, I was able to call .find_or_create_by on an embedded document collection and pass a type as a second parameter to the method. This would allow me to create a document of a specific … Continue reading 

| Leave a comment

Mongoid: Don’t Name A Field :options

Joey and I spent the last day or more upgrading our rails environment, specifically so that we could get from Mongoid v2.0.0.Beta.20 up to v2.0.1. In general, the upgrade went ok… with the exception of the Mongoid upgrade. There are … Continue reading 

| 1 Comment

Quick Fix (and a question): Mongoid Edge

I just went throught the process of upgrading my current app to the latest edge for Rails 3, Mongoid and all of my other gems. And when I went to run my specs, I received this error: Database command ‘drop’ … Continue reading 

Also posted in mongodb, rspec, ruby | 3 Comments

The Ruby/Rails Life – My Rails 3 Stack – Part 1

As some of you might know, About a month ago I left my almost 10 year career as a Microsoft developer to become an independent Ruby/Rails developer (a term I’m deeming “pulling a Gunderloy”). It was long overdue for me … Continue reading 

Also posted in blueprint, cancan, compass, devise, haml, jquery, mongodb, rails, ruby, rvm, sass | 11 Comments