I was just playing around with the new routing dsl to answer someone''s
question on the general rails forum.
I wanted to see how Rails3 handled globbed routes. So I added this
to routes.rb
get ''forum/*path'' , ''forum#show''
And had the show action just display the params.
with a URL of /forum/a/b/c
I got {"path" => "a/b/c"}
which is a change from Rails 2.x which would give
{"path" => ["a", "b", "c"]}
for the equivalent globbed route
map.connect "forum/*other", :controller => :forum, :action =>
:show,
:conditions => {:method => :get}
Is this an intentional change or a bug?
I do see it''s documented that way in the edge version of
http://guides.rails.info/routing.html#route-globbing
So I guess its intentional, but just wanted to make sure.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.