views:

13

answers:

0

I have ruby user model which has its validations written in separate file called validations.rb. This user model has an associated tasks model which has separate validations for it. During validation of user.rb, the code in validations.rb is trying to get the tasks that were entered in the form but it fails and instead gets the existing tasks from the database that is associated with that particular user. How do I prevent this, I want the current values entered in the form to be validated rather than the values already persisted in the database. Thanks.