Rails: modified models to use model names instead of modelid format.