Include has_one attributes correctly when calling to_params
Follow on to remiprev#206 to add support for has_one in to_params.
Also fixes remiprev#258
Great job. Would you mind merge this code into your own fork? I would like to point to your fork/master. Thank you.
:+1:
@remiprev Besides this now causing conflicts, what was the reason this was never merged? This is causing pain for us and I'd really like to see this on master. How can I make that happen?
@filib I suspect it has to do with https://github.com/remiprev/her/issues/324 . Once things get back on track I'll be happy to merge master back into this PR
@dturnerTS Ah, didn't see that and didn't realise that @remiprev was looking for a new maintainer. Thanks for the heads-up!
@dturnerTS i'm working to get Her down to 0 PRs. given there is already has_many serialization, i think it makes sense to do the same for has_one associations.
few things before we merge:
- how does it handle the case where the has_one association key is present but the value is nil?
- please rebase with master so that we can make sure this works with the current travis checks.
- please remove the commit bumping the version.
@hubert Thanks for looking into this again. (1) I've changed the code to be more defensive. (2) Conflicts are resolved (3) Version bump is removed
@dturnerTS thanks for taking the time to go through this again. can you rebase this instead of merging it?
I'm not a big fan or rebasing. Can you explain why you think its preferable to the master merge here?