scottohara / loot

An implementation of some of the core MS Money features in Ruby on Rails
MIT License
4 stars 3 forks source link

Add/edit/delete subcategory needs to update parent.num_children #54

Closed scottohara closed 10 years ago

scottohara commented 10 years ago

category.num_children is used to determine: a) whether to show the parent typeahead in the edit view (can't set a parent if has children) b) whether to warn on delete that subcategories will also be deleted c) to determine how many rows to splice out of the array after returning from delete

However num_children is only set on the initial retrieval from the server; so any changes to categories don't update this value.