Migrate to rails4

This seems that should be DRYed