|
Revision 437, 477 bytes
(checked in by aiwilliams, 1 year ago)
|
Adding forms extension. Presently a serios spike, proving a few things. Keep an eye on it, though.
|
| Line | |
|---|
| 1 |
require_dependency 'application' |
|---|
| 2 |
|
|---|
| 3 |
class FormsExtension < Radiant::Extension |
|---|
| 4 |
version "1.0" |
|---|
| 5 |
description "Forms: A Form Generation Engine for Radiant" |
|---|
| 6 |
url "http://forms.os.thewilliams.ws" |
|---|
| 7 |
|
|---|
| 8 |
def activate |
|---|
| 9 |
[Forms::Tags, Forms::Ext::Page].each { |ext| Page.send :include, ext } |
|---|
| 10 |
SiteController.send :include, Forms::Ext::SiteController |
|---|
| 11 |
end |
|---|
| 12 |
|
|---|
| 13 |
def deactivate |
|---|
| 14 |
SiteController.send :alias_method, :process_page, :process_page_without_forms_support |
|---|
| 15 |
end |
|---|
| 16 |
|
|---|
| 17 |
end |
|---|