Archive for the 'Rails' Category

Rails Routing Silliness

Saturday, April 26th, 2008
  map.resources :organizations do |organization|
    organization.resources :members, :member => {:activate => :get}
  end
  
  map.resources :organizations,
    :has_many => :members

There’s a lot of debate going on around these two blocks of code. Why am I opting for the top instead of the bottom? Because there’s no documentation for the bottom! I have no idea how to add a custom, member action to the has_many style of routing.

One thing is starting to annoy me about the latest revisions to Rails. Rails developers are very opinionated and want you as a fellow developer to follow recent conventions, but how can I follow a convention if there’s no documentation to support it?

Of course, I can’t really complain because I haven’t contributed to the documentation. My point is that if DHH and the rest of the core team have strong opinions about recent changes, they should put more of an emphasis on revising documentation to get people using the right conventions.

Railscasts - Get Your Weekly Dose of Ruby on Rails

Wednesday, June 27th, 2007

There are many great sites that publish educational material for the Ruby on Rails framework. Of note, Ryan Bates does a great job with Railscasts. I think screencasts are a great way to learn proper programming practices. Block off some time every week to review this site. I’ve already found it immensely helpful.

Here are some of my favorites:

Ruby on Rails Tools I’ve Been Using

Thursday, May 24th, 2007

With my new job, I’ve been delving into some great tools in the Ruby on Rails Community and I wanted to share some of my thoughts on them.

  • Railroad - this tool is just plain awesome. Based on your Rails models, it creates a database diagram complete with relationships and field data types. It does output a graph format that’s tough to deal with, but it’s nothing GraphViz can’t handle. If you’re a visual learner or if you work with one, this is such a time saver.
  • Shipping - this is a great rubygem that contains Ruby wrappers for UPS and FedEx Web Services (Tracking package status, printing return labels, etc.). At Second Rotation, We’re currently polishing off a DHL extension of this gem. The architecture of the library made it fairly easy to implement, and we’re hoping to contribute it to the open source project.
  • GBarcode - Another great rubygem that automates the creation of barcodes in various code symbologies. It was tough getting the native extension to work on a windows platform, but major kudos to the developer, Angel Pizarro, for helping us out extensively in getting it compiled and running. We integrated with
  • Heckle - although we haven’t used it yet, it looks really cool. It’s a code mutator that modifies your functional code to make sure your tests fail. If you’re practicing test driven development, this tool can really help evaluate code coverage and the robustness of your test harness.

It’s been great really delving into the Ruby on Rails Framework again. If you’re not building your web application with it, you’re really missing out on the wide array of open source tools. The development community around the platform is really thriving.