Latest from the Bamboo Blog

Rails || Merb matt

14 Jan 2008

After playing around with Merb and data mapper over the holidays, I thought a post on some of the differences that I’ve found between rails and Merb might be helpful to someone thinking about trying Merb out.

If you haven’t already installed Merb, check out Jon’s awesome screencast, that should get you started.

Here’s my list1:

The Rails wayThe Merb way
script/servermerb
script/consolemerb -i
redirect_to blog_path(@blog)redirect url(:blog, @blog)
respond_to provides :xml, :js, :yaml
formatcase content_type
render :xml => @postrender @post
render :file => 'public/404.html', :status => 404 raise NotFound
format.htmlonly_provides :html, :xml
loggerMerb.logger
before_filterbefore
render :partialpartial
f.text_field :nametext_control :first_name, :label => 'First Name'
RAILS_ENVMERB_ENV post v0.5.0 Merb.environment

  1. This list is by no means a complete list and I can’t guaranty that they won’t change as Merb is in active development, but feel free comment with anything I have missed.