![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
文档翻译
文章平均质量分 77
lanrion
这个作者很懒,什么都没留下…
展开
-
Rails route constraints api 介绍
Rails 为route的路由约束提供了constraints 方法,具体的使用如下:限制IP地址constraints(:ip => /192.168.\d+.\d+/) do resources :postsend 可以提供一个ip或者一个ip地址的范围进行限制,一旦检测到用户的ip地址符合限制范围,则会告知不存在此route。匹配动态请求这个例子是控制ro...2013-07-21 17:15:30 · 263 阅读 · 0 评论 -
Ruby中require、load、autoload的区别
require:require(filename) -> true or falseRuby tries to load the library named string, returning true if successful. If the filename does not resolve to an absolute path, it will be searched fo...原创 2013-07-29 21:34:12 · 370 阅读 · 0 评论