Problem :- Default action performed by jQuery on the partial data in
ruby on rails
description :- I am attempting the following. A customer select option
in the main form. when a user selects a customer in the main form his
bills should appear in a select format in all the subsequent partials.
Nested form gem is being used to get the partial.
Problem :- as i select the customer i am able to get the customer data,
here the customer bills, but i am not able to post the data in the
partial. the div id where i am supposed to post the data is not been
detected. Bills concerning only the customer selected, does not appear
in the partial.
solutions Tried. 1. rewrote the entire code thinking problem might be
with the data but failed.
2. changed the environment to windows thinking problem with the
environment but the same problem is appearing in windows too.
3. created a test project with one field in main form and one field in
the partial to see if the problem is there in the main project but same
error appears in the test project also.
4. Tried to send customer data to the partial and yet still the same
5. shifted the entire employee, customer and supplier code to partial.
this solves the problem of getting bills, but allows user to select
employee or supplier in the subsequent partials, fails validation,
because each partial is a separate entity and changes done in first
partial is not reflected in subsequent partial.
6. tried to achieve the above problem without using jquery with rails
code but java-script is very much required.
7. changed the nested form gem to cocoon gem thinking the problem is
with the gem, but the same problem occurs.