add fix for rails 4.1.6

Fix is pulled from https://github.com/composite-primary-keys/composite_primary_keys/pull/236