Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

PluginArchitecture

knewter edited this page Sep 13, 2010 · 7 revisions

We need to execute any code that plugins will need to hook into before the Rails initialize block in config/environment.rb (at the top of the file).

Ansuz::PluginManager will have an attr_accessor :plugins, and each Ansuz plugin will need to register itself.

A plugin will provide modules. Each Frontend module will need an associated Backend module. For instance, a ContentSection will have a base Frontend module that just renders the ContentSection on the page, and an associated Backend module that allows one to modify the content.

A plugin’s registration in init.rb could look something like this:

Ansuz::PluginManager.register_plugin(Ansuz::Plugins::JAdams::ContentSection)

…where Ansuz::Plugins::JAdams::ContentSection defines its Frontend modules and their related Backend modules.

Clone this wiki locally