What's the best way to edit and format page views using Irwi Wiki in Rails?
Here is the controller it's set up for me:
class WikiPagesController < ApplicationController
acts_as_wiki_pages_controller
end
Though there's no views folder corresponding to the controller. I just want to be able to edit the html or add css to the wiki articles I can create now.
As it says in the docs:
So, in your
viewsfolder, create a folder calledwiki_pagesand then put your new templates in that folder.Here's what's going on:
When your WikiPagesController currently goes to render a wiki page, it looks for a template in
apps/views/wiki_pagecorresponding to the current action. That folder/file doesn't exist, so it looks in other directories and ultimately finds the template in the gem. (You should be able to see this process in your console.)When you create the folder and add the template (as above), the WikiPagesController finds the template in your application and renders that, instead of rendering the template provided by the gem.