Created
August 7, 2008 07:46
-
-
Save carllerche/4359 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "allows wrapping of nested routes all having shared argument with PREDEFINED VALUES" do | |
Merb::Router.prepare do |r| | |
r.match(/\/?(en|es|fr|be|nl)?/).to(:language => "[1]") do |l| | |
l.match("/guides/:action/:id").to(:controller => "tour_guides") | |
end | |
end | |
route_to('/se/guides/search/stokholm').should have_route(:controller => 'tour_guides', :action => "search", :id => "stokholm", :language => nil) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment