A unified explanation for the supernova rate-galaxy mass dependence based on supernovae detected in Sloan galaxy spectra