add rails 4 support

@staugaard

No clue if it works.