map.with_options :conditions => { :subdomain => MIRRORS_REGEX} do |goyou_map|
goyou_map.target 'target/:type/:type_id/:sort',
:controller => 'target', :action => 'index',
:defaults => { :sort => 'target_id'
},
:requirements => { :type => /(category)|(concept)/,
:sort => /(target_id)|(change_rate)|(volume)/
}
end
conditions <= 必須符合這個條件才會apply, 不符合就繼續往下找
requirement <= 會符合這個 rule, 但是 paramter 需符合 requirement
沒有留言:
張貼留言