我在Rails 2中有这个代码:
map.namespace(:admin, :path_prefix => 'refinery') do |admin|
admin.load_gallery "/load_gallery", :controller => "pages",
:action => "load_gallery"
end
..并希望将其转换为rails 3路线。是否有人可以证明这是如何完成的?
答案 0 :(得分:0)
可能看起来像
scope 'refinery', :as => :admin do
match 'load_gallery'=> 'pages#load_gallery'
end