ruby and active-record practice