Hi Danny,
Daniel Owen van Dommelen wrote:
Because the user model has validations it performs on the password it starts throwing error when a user views the change_profile page. The errors are there as soon as the page is loaded, even before the form gets submitted.
3 errors prohibited this candidate from being saved
Is there a way to stop the model from using it's password validations whenever a user is changing his profile?
Sorry to be dense, but I'm not getting a clear picture here and need to ask a couple of questions. Is the password stored in the User model? Is the profile part of the User model? Validations get run on three events: create, update, and save. You must be doing one of those to get the errors you're getting. Which doesn't make sense given your description of the situation. Or maybe I just haven't gotten enough caffine into the system yet At any rate, you can specify which event(s) trigger the validation(s) in your validate methods. Check the ActiveRecord::Validations::ClassMethods documentation at http://api.rubyonrails.org/
hth, Bill