Before public conventions started, how were nominees for the presidency selected?

Before public conventions started, how were nominees for the presidency selected ?