views:

38

answers:

1

Say in a action, I want to create points in the code where someone can hook into, without having to go into the controller action and edit my code.

Is this possible? I guess they would have to hook into my code at some point when the application starts?

I know wordpress has a plugin arch with hooks, wondering if the same can be done in RoR and if there is already a design pattern for this.

+2  A: 

You can accomplish this by using

  1. Plugins
  2. Callbacks

Plugins allows you to extend Rails functionality by injecting more features into the main app. Callbacks allow you to define custom hooks other developers can take advantage of.

Simone Carletti
just what I was looking for, thanks!
Blankman