Hello everyone,
I am trying to use a RESTful controller for user inside a namespace
using AS and one outside for registration and so on. When i try to
visit the namespaced url I get Unknown action. Once i replace
active_scaffold :users with a def index; end i can the URL.
My routes look like:
map.register “register”, :controller => “users”, :action =>
“create”
map.resources :users
map.resources :user_sessions
Sample resource route within a namespace:
map.namespace :admin do |admin|
# Directs /admin/products/* to Admin::ProductsController (app/
controllers/admin/products_controller.rb)
# map.resources :admins, :active_scaffold => true, :has_many =>
[:events]
admin.resources :users, :active_scaffold => true, :has_many
=> [:events]
admin.resources :contracts, :active_scaffold => true
admin.resources :houses, :active_scaffold => true, :has_many
=> [:rooms, :photos, :contracts]
# map.resources :rooms, :active_scaffold => true, :has_many =>
[:contracts]
end
And my UsersController
class Admin::UsersController < ApplicationController
before_filter :jquery_noconflict
before_filter :authorize_admin
layout “admin”
active_scaffold :users
end
Thank you