API route in Rails
by Roger Smith
I am beginning to flush our an api in rails that will leverage OAuth as the authentication mechanism. I looked at this article as a starting point: http://www.jbarnette.com/2009/04/07/http-apis.html. This is exactly how I would envision laying out my api urls, but there is one update I want to note for Rails 3.1.1.
In your routes.rb file it should be:
namespace :api do
namespace :v1 do
resources :widgets
end
end
