标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1
对于此控制器路由links_path
links_path
up_link_url(link)
match "/random" => "links#random"
必须手动扩展路径还是有帮手?
答案 0 :(得分:1)
使用:as:
:as
match "/random" => "links#random", :as => :random_links
创建:
random_links_path #and random_links_url