|
|
wiki_column
wiki_column is a Ruby on Rails plugin that adds simple wiki functionality to your app. Wiki column allows you to specify a model that will act as your wiki storage, but then you can define any column to be a wiki column.
For instance, if you have a Product model that has a description. You could define description as a wiki_column, you could then use wiki syntax in that field and it would be formatted as such, including links to your wiki.
wiki_column uses RedCloth for basic formatting.
wiki_column is the result of web development work at Assay Depot.
Installation
First you have to have RedCloth installed
sudo gem install RedCloth
Next, install the plugin
./script/plugin install http://wiki-column.googlecode.com/svn/trunk/wiki_column
Now generate your wiki model
./script/generate scaffold_resource WikiPage slug:string body:text created_at:datetime updated_at:datetime
Next, in your WikiPage show.rhtml, change
<%=h @wiki_page.content %>
to
<%= @wiki_page.wiki_content %>
Finally, add a new wiki resource to your routes.rb file.
map.resources :wiki, :controller => 'wiki_pages'
Formatting
You can use all the standard textile formatting commands. Additionally, links are to other wiki pages should be surrounded by []. For example, to link to a page with the slug ProductInformation, use the following:
[ProductInformation]
