Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

From Merb to Rango

Tass edited this page Sep 13, 2010 · 5 revisions

First things first

I recommend reading the FAQ first.

File tree

Execute rango create stack blog to get an example of the most important files. Copy init.rb and config.ru into your merb project. Because Rango is quite free concerning file structure, you can keep the one from merb, just edit init.rb to require your model/view files. Replace the Rakefile, and merge the Gemfile. Run gem bundle once again, test everything with rake spec and see what needs to be changed. Commit on your rango_migration branch :-)

Views

ImplicitRendering

I’d recommend rewriting your views to templates and your controllers probably need some updating as well, as Rango doesn’t support any display method.

require 'rango/mixins/rendering'
class Application < Merb::Controller
  include Rango::ImplicitRendering
end

ExplicitRendering

If you prefer explicit rendering, it’s a bit more complicated. A lot more complicated. A lot of the Merb::Helpers won’t work. This application.rb is a try to get it working:

Router

Still stucks, no resource support, mostly nothing for rack. Work in progress.

Clone this wiki locally