> My immediate reaction was that it would, I was thinking along the same lines
> earlier. I've just tried it though, and I still end up with a literal "1" in
> the database. If I take the call to serialize out of the model, the
> overwritten setter does as you'd expect and I do end up with YAML in the db.
>
> I've done a bit of digging and here's what I _think_ is happening. Before
> the save happens, each attribute is quoted by attributes_with_quotes, and
> attributes_with_quotes uses read_attribute to fetch the value of each
> attribute. But, within read_attribute there is a call to
> unserialize_attribute (for serialized columns only) and hence we end up back
> where we started.

Sorry this took so long.  Conferences and projects lead to less
mailing list time.

We already have special code in there for serialized Date and Time
classes, so why not try something like:

http://pastie.caboo.se/327995

That causes two tests to fail simply because they're testing on
uniqueness of a serialized field while not storing serialized fields
in the database.

-- 
Cheers

Koz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to