Single band model for the unconventional superconductivity in both cuprates and ruthenates