I have a strange bug that’s driving me slightly crazy. Maybe the
symptoms will be more meaningful to someone else here…
I have a set of REST actions in my controller and a form_for in both
my new and edit views, in both cases with fields_for constructs
embedded. The models have some validation rules in place.
A successful create action renders the edit view to allow
modifications to be made the data.
However, if I enter invalid data into some of the embedded fields in
the form, when I resubmit the form the second time, with either valid
or invalid data, the browser ends up (apparently) invoking the index
action and it associated view instead of create. On the face of it it
kind of looks as if the browser request is coming in as a GET (since
that would turn a create index into an index), but there’s no obvious
reason that that should happen for a form, nor any inking in firebug
that that’s what’s actually happening.
Does this ring any bells with anyone? No doubt something simple, but
my sleep deprived brain just isn’t seeing it right now.
Thanks for any advice.