Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (23 sloc) 1.07 KB
require_dependency 'application_controller'
class TinyPaperExtension < Radiant::Extension
version "0.9"
description "Radiand CMS Tiny MCE support using Paperclipped assets"
url "http://blog.aissac.ro/radiant/tiny-paper-extension/"
define_routes do |map|
map.with_options(:controller => 'admin/tiny_paper') do |asset|
asset.images "/admin/tiny_paper/images", :action => 'images'
asset.images_sizes "/admin/tiny_paper/:id/images_sizes", :action => 'images_sizes'
asset.files "/admin/tiny_paper/files", :action => 'files'
asset.pages "/admin/tiny_paper/pages", :action => 'pages'
asset.create "/admin/tiny_paper/create", :action => 'create'
end
end
def activate
TinyMceFilter
Asset.class_eval { include TinyPaper::AssetExtensions }
Admin::PagesController.class_eval { include TinyPaper::AddJavascriptsAndStyles }
admin.page.edit.add :part_controls, "tiny_mce_control"
end
def deactivate
end
end