Change populate model to accept resource name.