 |
Forums |
Admin Start New Thread
By: Tom Copeland
Some reorganization [ reply ] 2009-08-27 23:59
|
I've been talking with Ryan Owens and Rich Kilmer about REST stuff and those discussions convinced me to move a bunch of stuff around. Basically we're going from something like this:
/groups/1/packages/2/releases/3/files.js
to
/releases/3/files.js
In other words, things are getting a lot flatter. Here's the latest routes file:
=======
ActionController::Routing::Routes.draw do |map|
parent_actions = [:create, :new, :index]
map.resources :groups do |group|
group.resource :news_bytes, :only => parent_actions
group.resources :packages, :only => parent_actions
end
map.resources :packages, :except => parent_actions do |package|
package.resources :releases, :only => parent_actions
end
map.resources :releases, :except => parent_actions do |release|
release.resources :files
end
map.resources :news_bytes, :except => parent_actions
map.resources :users, :collection => [:groups]
map.resources :processors
end
=======
I'll post a new version of the rubyforge gem that talks to this new API layout shortly...
Tom
|
|
 |