Installation:

1.) Install merb-ui gem. sudo gem install merb-ui

2.) Navigate to your merb application. cd ~/your_merb_app/

3.) Copy assets to your merb application. rake slices:merb_ui:copy_assets

4.) Add to your dependencies file. vim config/dependencies.rb a

dependency 'merb-ui'

esc : wq

5.) Add options to your init file in the before_app_loads callback. vim config/init.rb a

Merb::BootLoader.before_app_loads do Merb::Slices::config[:owner] = 'Your Name' #Owner in the Copyright. Merb::Slices::config[:year] = 2000 #Year in the Copyright. end

esc : wq

6.) Add to your router file. vim config/router.rb a

slice :merb_ui

esc : wq

7.) Add to your application layout file. vim app/views/layout/application.html.erb a

Your Merb Application <%= mui_head %> <%= mui_body do %> <%= mui_bar do %> <%= mui_tab_group(:tab_width => '6em') do %> <%= mui_tab(:type => 'merb_words') %><%= mui_tab(:type => 'merb_photos') %><%= mui_tab(:title => 'Projects', :controller => 'projects', :url => url(:projects)) %> <% end =%> <% end =%> <% end =%>

esc : wq


Advanced:

List all available tasks:

rake -T slices:merb_ui

Put your application-level overrides in:

host-app/slices/merb-ui/

Templates are located in this order:

  1. host-app/slices/merb-ui/app/views/*
  2. gems/merb-ui/app/views/*
  3. host-app/app/views/*