ActiveModel::Name doesn't respond to #underscore any more

Need to call #name first.
Merge pull request #1 from Floppy/rails4

ActiveModel::Name doesn't respond to #underscore any more