:require_no_authentication route error when creating User?

3,122 views
Skip to first unread message

Grant Birchmeier

unread,
Jul 19, 2012, 2:07:13 PM7/19/12
to plataforma...@googlegroups.com
I've got a fledgling form to can create/edit users. When I try to create a new user, it reroutes back to my main project index page, and the user is not created.

I put a log on my UserController.create method, and it appears that it's not being called.  Is Devise somehow redirecting my create action?

This is the error in the log:

Started POST "/users" for 127.0.0.1 at 2012-07-19 10:29:26 -0500
Processing by Devise::RegistrationsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"blah", "user"=>{snip}, "commit"=>"Create User"}
  User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 68ms (ActiveRecord: 1.0ms)

I know I'm doing something wrong, but I'm not sure what.

Carlos Antonio da Silva

unread,
Jul 19, 2012, 5:48:23 PM7/19/12
to plataforma...@googlegroups.com
Try to check your rake routes, it's likely that there's a devise registration route being called instead of yours (as you can see in the log), because they both match.

You should/could use a different route for your controller to not conflict with devise ones.

-- 
At.
Carlos Antonio

On Thursday, July 19, 2012 at 3:07 PM, Grant Birchmeier wrote:

WHERE

Grant Birchmeier

unread,
Jul 19, 2012, 6:46:36 PM7/19/12
to plataforma...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages