Rails 提供 命名的路线。
可以使用 path 或 url 调用 Routeshelper
例如:
# and provide these named routes
root_url # => 'http://www.example.com/'
root_path # => '/'
坦率地说,我从来没有使用过 *_url
助手,我能够得到的东西工作使用 *_path
。
我有点困惑,这两个不同的帮手的目的是什么?
how are they different from one another?
一些真实的例子和解释什么时候使用什么将是伟大的。