Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Additions and edits to belongs_to relationships aren't updated in the drop down #1118
If you are editing a model that has a belongs_to relationship with another, you can edit existing or create new models of this type right from that page. If you do, the drop down will be updated to have this new value. However, if you change your selection or look in the drop down, it won't have the new record if you created one or the edited value of a record if you did that. If you refresh the page, the drop down will be populated with the proper values as it reloads the relationship objects from the database.
It'd be great if the contents of these drop downs could be dynamically updated.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
And othe useful think would be to reload related belongs_to association as well when one is selected. Eg. I have a model Client which has_many of model Division, then I have model Contract which has belongs_to Client and belongs_to Division. Which should be a select for Client's Divisions. And the workflow should be to select Client, reload Division list and select Division when creating new contract. That would move RA even further:-)