I'm using authlogic for my authentication plugin and have a three step wizard setup that sets up a a user that is acting as authentic with authlogic doing stuff behind the scenes like encrypting passwords, etc.
When the final step is completed and the FINISH button is pressed the User object is written to the database but it looks like authlogic hasn't had a chance to do it's stuff as various fields it populates are nil. The result is this error:
Mysql::Error: Column 'crypted_password' cannot be null: INSERT INTO 'users'
Wizardly uses mass assignment to submit my final record and this conflicts with using attr_protected on some important user attributes. Can anyone recommend a work round so I can use wizardly, authlogic and attr_protected? I'm thinking - maybe a callback method that I can use in place of mass assignment so I can poke in the values into a new User object myself?
I'm using authlogic for my authentication plugin and have a three step wizard setup that sets up a a user that is acting as authentic with authlogic doing stuff behind the scenes like encrypting passwords, etc.
When the final step is completed and the FINISH button is pressed the User object is written to the database but it looks like authlogic hasn't had a chance to do it's stuff as various fields it populates are nil. The result is this error:
The bottom of the code stack looks like this:
After a lot of digging the crypted_password field is not being set as I've protected it in my model to prevent people setting up users using a URL (see http://b.lesseverything.com/2008/3/11/use-attr_protected-or-we-will-hack-you ).
Wizardly uses mass assignment to submit my final record and this conflicts with using attr_protected on some important user attributes. Can anyone recommend a work round so I can use wizardly, authlogic and attr_protected? I'm thinking - maybe a callback method that I can use in place of mass assignment so I can poke in the values into a new User object myself?