开发者

Rails - Change locations of the default views, layouts, and partials paths

I want to change the location of my view files from app/views/* to view/html/*, my layouts directory from app/views/layouts/* to view/layouts/*, and, lastly, I would like to store my partials separate开发者_开发百科 from my views in a location like view/partials/*. How would I do this?


First of all, I'd be very curious as to why you'd want to do this.

Rails does have view paths but these aren't really capable of this kind of customization.

You'd be better off using symlinks on a *nix like OS.

$ ln -s source_file link_name

For example:

$ ln -s app/views view/html
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜