Add docs about behaviour of replacing a has_one associate object, that the previous one is deleted even if the new one
 doesn't get persisted to database.

 Fixes #13197 . [ci skip]
Merge pull request #13838 from vipulnsward/13197-fix-has-one-documentation

Add docs about behaviour of replacing a has_one associate object.
Fix indent on test case [ci skip]
Only raise when unscope definitely fails