views:

64

answers:

1

How do you make the documentation available after running rake doc:app available within your project.

I know I can browse on the local machine but I want to allow other uses to browse the documentation within the application.

I have created a documentation controller within which I have an index method as follows

class DocumentationController < ApplicationController
  def index
    render 'doc/app/index.html'
  end

end

This partially works as it renders the frame but each frame is filled with messages such as

*No route matches "/files/doc/README_FOR_APP.html" with {:method=>:get}*

So how do I change where a particular controller sets its equivalent of DOCROOT to.

+2  A: 

Why don't you copy 'doc' into the 'public' directory in the root of your rails app? They are just static HTML files and would be available through just Apache serving them.

Mike Buckbee
The obvious answer had alluded me. That would certainly work. Thanks
Steve Weet
Somewhat more elegant: make a symbolic link instead of copying. That way, if the documentation changes, the directory in your rails app changes with it.
mrueg
subw - that is a good call. If you're on a platform that supports creating symlinks that is the way to go.
Mike Buckbee