Using Rails 3.0.7, I\'m creating an API for our app, and I have this setup:
routes.rb
namespace :api do
namespace :v1 do
match \"connect\" =&
skip_before_filter
also general takes a symbol parameter for the before filter than you wish to skip. Controller names should not have to be unique as long as the proper scoping/namespacing is applied.
example
then the code per controller
class Api::V1::UsersController < Api::V1::BaseController
end
class Admin:UsersController < Admin::BaseController
end
class UsersController < ApplicationController
end
Then the routes
MyApp::Application.routes.draw do
scope :module => "api" do
namespace :v1 do
resources :users
end
end
namespace :admin do
resources :users
end
resources :users
end