Partition and URL Mapping

Version

This document applies to Rubricks-0.5.x

Partition

Rubricks have 'Main Contents' which is offered by each component. Rubricks is composed of header, footer, blocks, and the main contents.

URL Mapping

For instance, when the "Greet" controller of the "HelloWorld?" component is called, URL "http://localhost:3000/hello_world/greet" is specified. This URL comes for the mapping to be done as follows.

ComponentControllerActionMain Contents
hello_worldgreetindexmain

"index" action of controller contains main contents which rendering by "main" action of same controller, header, footer, and all blocks appropriate position. This is achieved by the method of "define_page".

Main contents is rendered by "main" action usually, but it is also possible to change as follows.

  • http://localhost:3000/hello_world/greet/_say
  • url_for :controller => '/hello_world/greet', :main => '_say'

Attachments