在您的项目中运行rake doc:app之后,如何使文档可用?
我知道我可以在本地机器上浏览,但我想允许其他用户浏览应用程序中的文档。
我创建了一个文档控制器,在其中我有如下的索引方法
class DocumentationController < ApplicationController def index render 'doc/app/index.html' end end
这在渲染帧时部分起作用,但每个帧都填充了消息,例如
没有与:method=>:get匹配的app.html“的/files/doc/readme_路由
那么,如何更改特定控制器将其等效docroot设置为的位置。
为什么不把“doc”复制到Rails应用程序根目录下的“public”目录中?它们只是静态的HTML文件,可以通过为它们提供服务的Apache来使用。