Category Archives: rails

activeuuid – binary uuid primary keys in Rails 3.1 on MySQL

I’ve been debating a lot recently if I want to use NoSQL (Cassandra) for my next project or if I should just use MySQL. I plan to write a longer post on this soon, but for now I want to share with you a little gem I wrote. I plan to use NoSQL in the [...]
Also posted in code | Leave a comment

visualize state_machine‘s with graphviz

The guys at Plugin-a-week have written a nice ActiveRecord state machine gem called state_machine. One of the great things about state machines is that they often can be visualized. To that end I’ve written a small utility that will load a class that uses state_machine and produce dot output which you can use with graphviz. [...]
Posted in rails | Tagged | Leave a comment

ActiveRecord from_xml (and from_json) part 2

This post is an upgrade to the previous post about the unmarshalling of XML and JSON strings into rails objects, with arbitrarily deep object associations. As you may know if you are reading this, there doesn’t seem to be a way in rails to reverse to_xml and to_json when associations are included. Example usage: xml [...]
Posted in rails | Tagged , , , , , | 9 Comments