Convert rails ID to a string and back for retrieval