Hi,
If anyone can answer this question, it would be much appreciated.
I've been playing around with Merb Router and came across some
functionality which strikes me as somewhat odd.
If I define a route:
match("/search/:type(:/q)").to(:controller => 'home', :action =>
'search')
The "q" parameter is optional. I can access the action correctly if I
use the full url (e.g. /search/user/test). But I also want to have
the same action accessible by a POST method. If I have a search form
send a POST to /search/user with a param "q" in the form, the "q"
param is wiped out and set to "nil." It's also wiped out if I call a
GET with /search/user/?q=test.
If this the functionality that is expected? Or is this a bug? Since
"q" is optional, I would expect to be able to access that action with
or without the parameter in the url string and not have it set to
"nil" by the router.
Thanks.
-- tc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---