Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Problems mixing wizardly with authlogic #3
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?