Hi,

I'm developing an API as a rails plugin, and I would like to be able
to install multiple versions in parallel.
The routing is not a big problem, I can define routes with the correct
prefix. The problem would be with the controller though.
I think it would be  preferable to have the controller keep its name
across versions, but then, how can the routing know which controller
should handle the request?

If I have versions v1 and v2 of the api installed, the plugins would
provide these routes:
  connect '/rest/simple/v1/:controller/:action/:id"
  connect '/rest/simple/v2/:controller/:action/:id"

To make it work, would the only solution be to have the controllers called
Rest::Simple::V1::MyController and Rest::Simple::V2::MyController ?

I currently don't see an alternate solution. Does anyone here have one?

Thanks in advance

Raphaƫl



-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org

--~--~---------~--~----~------------~-------~--~----~
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