<%= module_name %> <%= "=" * module_name.size %> A slice for the Merb framework. ------------------------------------------------------------------------------ To see all available tasks for <%= module_name %> run: rake -T slices:<%= symbol_name %> ------------------------------------------------------------------------------ Instructions for installation: file: config/init.rb # add the slice as a regular dependency dependency '<%= base_name %>' # if needed, configure which slices to load and in which order Merb::Plugins.config[:merb_slices] = { :queue => ["<%= module_name %>", ...] } # optionally configure the plugins in a before_app_loads callback Merb::BootLoader.before_app_loads do Merb::Slices::config[:<%= symbol_name %>][:option] = value end file: config/router.rb # example: /<%= symbol_name %>/:controller/:action/:id add_slice(:<%= module_name %>) # example: /:lang/:controller/:action/:id add_slice(:<%= module_name %>, :path => ':lang') # example: /:controller/:action/:id slice(:<%= module_name %>) Normally you should also run the following rake task: rake slices:<%= symbol_name %>:install ------------------------------------------------------------------------------ You can put your application-level overrides in: host-app/slices/<%= base_name %>/app - controllers, models, views ... Templates are located in this order: 1. host-app/slices/<%= base_name %>/app/views/* 2. gems/<%= base_name %>/app/views/* 3. host-app/app/views/* You can use the host application's layout by configuring the <%= base_name %> slice in a before_app_loads block: Merb::Slices.config[:<%= symbol_name %>] = { :layout => :application } By default :<%= symbol_name %> is used. If you need to override stylesheets or javascripts, just specify your own files in your layout instead/in addition to the ones supplied (if any) in host-app/public/slices/<%= base_name %>. In any case don't edit those files directly as they may be clobbered any time rake <%= symbol_name %>:install is run.