Skip to content

genki/merb_component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

merb_component
=============

Merb plugin that provides composition of controllers.

Example of use:

  In config/router.rb:

    resources :posts do |post|
      post.aggregates :comments
    end
    resource :admin, :controller => :admin do |admin|
      admin.aggregates :comments
    end

  In controllers:

    class Posts < Application
      aggregates :comments

    class Admin < Application
      aggregates :show => :comments

  In views:

    Content of the user (id is 2) goes here
    <%= component :users, :show, :id => 2 %>

  For detail, you can see spec/fixture as an example.

  Enjoy!

  Genki Takiuchi

About

Merb plugin that provides composition of controllers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages