rails

What makes a top award candidate, anyhow?

Posted by Michael on August 1, 2009 in General, Ruby Language

In our local Linux user group mailing list, one of the participant asked the group for recommendations for open source software projects that should be considered for a prominent publication’s top 100 awards. The ensuing discussion got me to wondering: What is the purpose behind doing the awards? Most of what I [...]

One ActiveRecord Model Acting as a List and Tree

Posted by Michael on April 30, 2009 in Programming, Ruby Language

Occasionally, Rails can appear to make your life extremely easy while silently throwing you a curve-ball. I needed a model that required a hierarchy while also preserving order of the records. Although fairly straightforward to set up and start immediately using, there are a couple of “gotchas” to watch out for and this [...]

Rails vs. Ramaze Performance Comparison

Posted by Michael on February 19, 2009 in General, SQL, Servers, Systems

One of my biggest concerns of late is that my “more than just a little trivial” Rails projects seem to find their way straight into the heavyweight category in no time at all. While I am quite hopeful that Merb being the 3.0 version of Rails will resolve many of the issues I face [...]

Rails has and belongs to many (habtm) demystified

Posted by Michael on October 27, 2008 in CSS, Programming, Ruby Language

Every time I have to implement a many-to-many relationship between Rails models, I seem to have to figure out how to do it effectively all over again. Especially as Rails seems to evolve the relational hooks with better support and elegance. Here, I will show a has_and_belongs_to_many strategy that works well for me. Along the way, I’ll expose a few other minor tricks, such as adding a custom inflector for pluralizing your model or not adding the ID column on a table declaration.

DRYing your Views

Posted by Michael on July 5, 2008 in General, Ruby Language, SQL

Let me start out by saying that I am finally beginning to understand a bit about that magical Ruby block notion and how implementing methods through block passing can really empower you as a Ruby developer. Thanks to, a most excellent Ruby tutorial, I am definitely feeling a good bit more empowered about getting [...]

A model-free wizard

Posted by Michael on May 13, 2008 in Programming, Ruby Language

Maybe I’m taking the whole MVC thing too far, but I’ve been reading and learning both Ruby and Rails at a fairly fast clip and just when I thought I was getting the hang of what goes in models, views, and controllers respectively, along comes The Advanced Recipe for Rails book with a recipe for [...]