ActiveScaffold ForeignKey Error

I’ve inherited a legacy rails project (1.2x), running on multiple
hosts behind a load balancer, and I’m occasionally seeing 500 errors
when trying to create a nested activescaffold form. AS is trying to
insert null into the foreign key to the parent. I’ve compared the ajax
requests on a failed case and a successful call, and they’re both the
same, so I’m validating that the same codebase is running on each
machine, etc.

However, I can’t tell how active scaffold is supposed to be passing
through the foreign key to the parent row, which is making tracking
down this bug a bit more difficult. The generated form has inputs that
correspond to the nested object’s values, as well as the following
values on the form tag (I’ve converted names of the parent-child
relationships to a department-employee model – the actual names are
different):

So a few questions:

  1. Where in the HTML does activescaffold store the link to the parent
    object? Is it related to the EID somehow? I assumed that the EID is
    simply how activescaffold is making the ajax call uniquely identified,
    and has no relationship to the parent row id…
  2. Has anyone experienced non-deterministic errors with activescaffold
    and ajax similar to this?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs