Friedrich Karl von Savigny (1779-1861) taught history to Jacob (1785-1863) and Wilhelm (1786-1859) Grimm a generation before von Ranke (1795-1886). So yes, history was taught at universities before von Ranke. What von Ranke did was to elevate it into a methodology that dominated the field for a century afterwards.