Want to Move RestfulAuthentication's UsersController to Admi

I’m trying to move RestfulAuthentication’s UsersController to an Admin
module–Admin::UsersController–as I’m also adding roles and
permissions for an app I’m building. I would like this all to be
within a single user interface with a standard security level required
for all these pieces as defined in Admin::BaseController.

So far, I’ve been able to view the /admin/users/new form and a list of
users I built at /admin/users/ or /admin/users/list, but if I try to
submit the /admin/users/new form, I get an error saying that the
UsersController cannot be found. Also, if I set login_required in the
Admin::BaseController, I get an error that appears to state that
SessionsController cannot be found in the /admin directory, which is
true.

I think the problem lies in lib/authenticated_session.rb, but I’m not
sure where to begin. Has anyone else tried this? I see very few
references, all questions, using Admin::UsersController, but no
answers.

Thanks, and sorry for not posting exact errors. I’ll post tonight when
I get home if no one has responded.

  • Ryan

Okay, here is the Full Trace (Application Trace gives me nothing):

NameError in UsersController#create

uninitialized constant UsersController

RAILS_ROOT: /Users/ryan/Sites/projects/rails_apps/accounting
Application Trace | Framework Trace | Full Trace

vendor/rails/activesupport/lib/active_support/dependencies.rb:266:in
load_missing_constant' vendor/rails/activesupport/lib/active_support/dependencies.rb:452:inconst_missing’
vendor/rails/activesupport/lib/active_support/dependencies.rb:464:in
const_missing' vendor/rails/activesupport/lib/active_support/inflector.rb:257:inconstantize’
vendor/rails/activesupport/lib/active_support/core_ext/string/
inflections.rb:148:in constantize' vendor/rails/actionpack/lib/action_controller/routing.rb:1358:inrecognize’
vendor/rails/railties/lib/dispatcher.rb:38:in dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb: 78:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:
76:in synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb: 76:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in
process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:ineach’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in
process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:inrun’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in
initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:innew’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in
run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:ininitialize’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in
new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:inrun’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/
configurator.rb:271:in run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:270:ineach’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/
configurator.rb:270:in run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails: 127:inrun’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:
211:in run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 vendor/rails/activesupport/lib/active_support/dependencies.rb:488:inload’
vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in
load' vendor/rails/activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’
vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in
load' vendor/rails/railties/lib/commands/servers/mongrel.rb:64 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' vendor/rails/activesupport/lib/active_support/dependencies.rb:495:inrequire’
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in
new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:495:inrequire’
vendor/rails/railties/lib/commands/server.rb:39
script/server:3:in `require’
script/server:3

vendor/rails/activesupport/lib/active_support/dependencies.rb:266:in
load_missing_constant' vendor/rails/activesupport/lib/active_support/dependencies.rb:452:inconst_missing’
vendor/rails/activesupport/lib/active_support/dependencies.rb:464:in
const_missing' vendor/rails/activesupport/lib/active_support/inflector.rb:257:inconstantize’
vendor/rails/activesupport/lib/active_support/core_ext/string/
inflections.rb:148:in constantize' vendor/rails/actionpack/lib/action_controller/routing.rb:1358:inrecognize’
vendor/rails/railties/lib/dispatcher.rb:38:in dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb: 78:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:
76:in synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb: 76:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in
process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:ineach’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in
process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:inrun’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in
initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:innew’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in
run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:ininitialize’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in
new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:inrun’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/
configurator.rb:271:in run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:270:ineach’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/
configurator.rb:270:in run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails: 127:inrun’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:
211:in run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 vendor/rails/activesupport/lib/active_support/dependencies.rb:488:inload’
vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in
load' vendor/rails/activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’
vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in
load' vendor/rails/railties/lib/commands/servers/mongrel.rb:64 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' vendor/rails/activesupport/lib/active_support/dependencies.rb:495:inrequire’
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in
new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:495:inrequire’
vendor/rails/railties/lib/commands/server.rb:39
script/server:3:in `require’
script/server:3

Request

Parameters:

{“user”=>{“password_confirmation”=>“1234”,
“login”=>“julie”,
“password”=>“1234”,
“email”=>“[email protected]”},
“commit”=>“Sign up”}

Show session dump


:return_to:
:user: 2
flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{“cookie”=>[],
“Cache-Control”=>“no-cache”}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs