Any clues as to how I could create a user without actually being sent
to the user controller’s create action? The before_save and
before_create actions are private.
The default generator for restful_authentication creates a user model
with the constraint “validates_presence_of :login”. Unless you
removed this from the user model you’ll need to supply a login.
Also, did you check the errors on the user model after the failed save
to see why it’s not saving? u.errors (using your example) will give
you the list of errors.
Thanks mike - I did remove this constraint… but I did not remove the
constraint that login must be unique… so it was conflicting with a
previous user that has a login of ’ ’
Next time use #save! rather than #save to get validation errors.
Alternatively you can also view the errors on the object by calling #errors and looking at what’s in there (e.g., puts user.errors).