Hi,

I've been trying to implement a versioned API, I went through
different versions that I didn't like.

I am wondering if I can do something like this with routes, and if
it's possible how can it be implemented:

api.example.com/items/show.xml works, no version
api.example.com/v1/items/show.xml works, v1
api.example.com/v2/items/show.xml works, v2

Basically I am wondering if Rails Routing (or rack) can detect "v1" or
"v2" and set a params[:version] variable, and then proceed as that
string is not there (regular routing).

--
M.
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to