Are you sure you're passing the model's ID? If you change the email, is the record edited, or do you get a completely new record? Cake will check the ID to see if the unique field it finds belongs to the currently-edited object. If so, it should let it pass.
On Tue, Jun 9, 2009 at 1:32 PM, Jon Chin<[email protected]> wrote: > I'm hoping somebody here can help me figure out how to use isUnique in > my model correctly. > > I have a db table with email, name, etc. I developed an action in my > controller and a view for the purpose of allowing the user to editing > the data stored here. I created a rule isUnique for the email field and > it worked perfectly. > > However, I needed to convert it to a page where groups of these settings > are in their own view (and I load them into the page via AJAX). Now, it > won't let the user save changes to their profile without changing their > email (since it detects that the email they entered already exists). > > Can anybody tell me why this change to AJAX element rendering is causing > this? Or better yet, how I can fix it? Thanks. > > -- > Jon Chin > 801-592-5029 > email: [email protected] > AIM: port23user > Google Talk: [email protected] > MSN Messenger: [email protected] > Yahoo Messenger: port23user > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
