这是我的 Rails 2 路线:
map.with_options :controller => 'foo', :conditions => { :method => :post } do |foo|
foo.one 'one', :action => 'one'
foo.two 'two', :action => 'two'
foo.with_options :special_flag => 'true', :path_prefix => 'special_prefix',
:conditions => { :method => :get } do |bar|
bar.three '', :action => 'for_blank'
bar.four 'another', :action => 'for_another'
end
end
如何将这种东西转换为 Rails 3?以同样的方式继续使用 with_options ?在某些情况下它变得更加冗长,因为而不是做
match '' => 'foo#for_blank'
我正在做
match '', :action => 'for_blank'