Yeah, I definitely don't think it's Validation related... but even when I strip the models way down, I can't seem to find what's causing it.
Thoughts? On Jan 18, 2:36 pm, mikelb <[email protected]> wrote: > OK... after some more playing around with it, it appears to have > nothing to do with whether I enter a new payroll in or not. I just > have to hit "update" without doing ANYTHING and I still get the > issue. Additionally I took out all possibility of validation errors, > and I still get the issue... thoughts???? (Please) > > On Jan 18, 1:56 pm, mikelb <[email protected]> wrote: > > > Hi all! > > > This is a particularly difficult problem for me to solve or even > > identify the root cause. I'm using ActiveScaffold with a relationship > > that looks like this: > > > service_store has_many payroll (which of course has the reverse > > association of payroll belongs_to service_store) > > > here is the basic structure: > > > service_store > > -------------------- > > id > > ... > > > payroll > > --------- > > id > > service_store_id > > ... > > > What happens is that in a subform view (when editing a given > > service_store), if that service_store has an existing payroll and I > > enter in a new payroll, but there is a validation error on the > > payroll, then all of the existing payrolls get one of these: > > > UPDATE payroll > > SET service_store_id = NULL > > WHERE (service_store_id = ... AND id IN (..., ..., ...)) > > > If there are no validation issues, the save goes as planned and > > everyone is happy.... but I can't have it killing the relationship > > just because it isn't validated! > > > Many thanks for any help in tracking this down or shedding light on > > the matter. > > > BTW, I'm using Rails 2.3.8 -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.
