This project is archived and is in readonly mode.
:inverse_of not honored when replacing a has_one association
-
George Ogata
- Tag set to activerecord, inverse_of, patch, tested
-
Eloy Duran
- Milestone set to 2.3.6
- State changed from new to verified
- Assigned user set to Michael Koziarski
Applies and runs.
-
Eloy Duran
Pushed this change to our repo: http://github.com/Fingertips/rails/commit/c433e9bd1ae5a6c4a32b456a5...
-
Murray Steele
- Assigned user cleared.
I'm attaching a patch that should go on top of this one to:
a) add more tests for the various ways you can assign things (bang methods, <<, =, replace) for all the association types
b) get rid of a duplicate set_inverse_instance if you happen to use new_record(true) -
Repository
- State changed from verified to resolved
(from [ed5b89483a1d9b0582e09d8e5fc5c38ecb0c809d]) Set inverse for #replace on a has_one association. [#3513 state:resolved]
Signed-off-by: Eloy Duran eloy.de.enige@gmail.com
http://github.com/rails/rails/commit/ed5b89483a1d9b0582e09d8e5fc5c3... -
Repository
(from [592085be83ed1b8ff0065a92490e54fcb1a8bc87]) Add more tests for the various ways we can assign objects to associations. [#3513 state:resolved]
Get rid of a duplicate set_inverse_instance call if you use new_record(true) (e.g. you want to replace the existing instance).
Signed-off-by: Eloy Duran eloy.de.enige@gmail.com
http://github.com/rails/rails/commit/592085be83ed1b8ff0065a92490e54... -
Repository
(from [fc85c665271578e55e7fe90a721ca1533289d923]) Set inverse for #replace on a has_one association. [#3513 state:resolved]
Signed-off-by: Eloy Duran eloy.de.enige@gmail.com
http://github.com/rails/rails/commit/fc85c665271578e55e7fe90a721ca1... -
Repository
(from [6c8c85bc1eaf1639ea0df5f356e7105c74d128b2]) Add more tests for the various ways we can assign objects to associations. [#3513 state:resolved]
Get rid of a duplicate set_inverse_instance call if you use new_record(true) (e.g. you want to replace the existing instance).
Signed-off-by: Eloy Duran eloy.de.enige@gmail.com
http://github.com/rails/rails/commit/6c8c85bc1eaf1639ea0df5f356e710...
