Replace last_build has_one association with model method