finished hash and activerecord