Skip to content
This repository was 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

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. Rango doesn’t support any magic @instance_variable transfer to view either. Use

def index
  render 'posts', posts: Post.all
end

and

= block(:content) do
  - for post in posts
    -# go on...

instead of @posts magic.

Router

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

Clone this wiki locally