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