开发者

how can i use rails 3 router out of rails?

开发者 https://www.devze.com 2023-02-14 13:21 出处:网络
I use a vps, i will cache all the pages use page cache. 开发者_如何转开发After do that, i think i don\'t need load all rails stuff in memory, just router parse will work for me. Does any one know how

I use a vps, i will cache all the pages use page cache. 开发者_如何转开发After do that, i think i don't need load all rails stuff in memory, just router parse will work for me. Does any one know how to do that?


If you are serving static pages in Rails, you can just place them in 'public/' directory, that way you would not use any routes. However if you serve them in views, you would need to interact with your routes, since views is entirely separated it needs to talk to routes to get into a controller action. (views -> routes -> controller_action)

0

精彩评论

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

关注公众号