constraints (:version  => /[0-9]{1}(?:.[0-9]{1,2})/) do
   match 'ws/:api_version => 'api#create'
 end

This route will match to 'ws/1.23" and you will have params[:version] ==
"1.23"

On Sat, Jan 21, 2012 at 1:35 AM, Rob Biedenharn
<[email protected]>wrote:

>
> On Jan 20, 2012, at 7:38 AM, Loganathan Sellapa wrote:
>
> Hi All,
>
> I am having routes like below to delete/list an user.
>
> map.connect
> 'developer/:user_name/delete',:controller=>"developers",:action=>"delete",:method=>:delete
>
>
> You probably need to keep the '.' from being treated as a separator (like
> for a format):
>
> :requirements => { :user_name => /.*/ }
>
> -Rob
>
> map.connect
> 'developer/:user_name/list',:controller=>"developers",:action=>"list",:method=>:get
>
> While listing the user by encoding the Dot with %2E, i can see the success
> response 
> http://localhost:3000/developer/testuser%2Ehu/list<http://localhost:3000/developer/testuser.hu/list>
>
> But While trying to delete the user who containing the Dot(.), throws 404
> error.
>
> http://localhost:3000/developer/testuser%2Ehu/delete<http://localhost:3000/developer/testuser.hu/delete>,
>  thanks in advance
> regards,
> Loganathan
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.
>



-- 
Regards
Mukesh Paras Singh

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to