[ci skip] Five methods added by has_one and belongs_to.

Also clean up some trailing spaces.