fixes regression in using an attribute introduces in 318e93a

A fix for serializing an attribute declared as serializable intended for the rails 2.3 branch was applied without taking note of the altered attribute name introduced in the rails 3 branch. The purpose of the serialization fix is still valid though. So this commit fixes both, the serialization bug 318e93a intended to fix as well as the regression introduced by 318e93a.

Please see the diff with 3586197ef0da8a461bd3b5cee0cebaab80ec5b97 as it will ease reviewing.