updated to work with rails 4 and changed migration to accept non-integer ids