There's no need to access Railties through self.class

Closes #9386