Plugin Based application design pattern
HI, I am developing an application in RoR3.

I want it have a plugin based structure for the complete application. A core plugin will wrap the whole application, and any further functionality will be uploaded to application in the form of plugin. Also these plugins must be recognized by the administration controller of the core plugin, and for each plugin and controller inside plugin, appropriate authorization can be configured. 

I am using Devise and CanCan for authentication and authorization. 

Can any one provide me the reference or guide to accomplish my scenario. 
Plugin Based application design pattern
===

HI, I am developing an application in RoR3.

I want it have a plugin based structure for the complete application. A core plugin will wrap the whole application, and any further functionality will be uploaded to application in the form of plugin. Also these plugins must be recognized by the administration controller of the core plugin, and for each plugin and controller inside plugin, appropriate authorization can be configured. 

I am using Devise and CanCan for authentication and authorization. 

Can any one provide me the reference or guide to accomplish my scenario. 