Forum: Ruby on Rails Deserializing objects in the controller

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
unknown (Guest)
on 2007-08-02 15:21
(Received via mailing list)
I've an AR model that serializes another object (A), which does not
inherit from ActiveRecord::Base. The problem I'm facing is that while
A can be deserialized properly in script/console, it deserializes as
YAML::Object in the controller. This means that the methods on A are
not available on the deserialized instance and I receive NoMethodError

I've tried to use YAML to manually perform serialization/
deserialization but the problem doesn't go away.
This topic is locked and can not be replied to.