Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use assert_not rather than refute | Piotr Sarnacki | 2013-08-12 | 1 | -5/+5 |
| | |||||
* | Refactor NestedAttributesWithCallbacksTest for clarity | Ben Woosley | 2013-08-12 | 1 | -67/+66 |
| | | | | | | | 1) Use `assert` and `refute` where possible. 2) Separately include the setup, subject, and assertions in each test - don't hide the tested call in an assertion method. 3) Name things based on their role rather than incidental facts about them - e.g. `@bird[1]` -> `bird_to_destroy`. `bird2_deletion_attributes` -> `destroy_bird_attributes`. 4) Use more succinct naming where possible - e.g. `birds_with_callback` -> `birds_with_add`, `@pirate_with_two_birds` -> `@pirate` | ||||
* | Fix interactions between :before_add callbacks and nested attributes assignment | Dr.(USA) Joerg Schray | 2013-08-12 | 1 | -0/+145 |
Issue #1: :before_add callback is called when nested attributes assignment assigns to existing record if the association is not yet loaded Issue #2: Nested Attributes assignment does not affect the record in the association target when callback triggers loading of the association |