fix for resource_class default value definition

This is just improved version of https://github.com/josevalim/inherited_resources/pull/315. I had added test examples for that issue. So this pull request more accurate.