I'm not sure about the method, but here goes:

Pair up each husband and wife as a "couple". So we have 4 couples, 4 bachelors and 4 spinsters.

Effectively we have 12 "seats"

Now, let's take the following cases.

1. All couples in one compartment .

No. of ways this can be achieved is 2

2. Three couples in one compartment,

No. of combinations = =224

3. Two couples in one compartment

No. of combinations = =840

4. One couple in one compartment

No. of combinations = =224

Total combinations = 1. +2. +3. + 4. = 450+840 = 1290?