I am using the Classifier:Bayes as part of a model class. I have the class set up to serialize the classifier to the db.
class Foo < ActiveRecord::Base
serialize :classifier
end
The yaml appears in the db just fine after doing some training and saving the object.
But when I query for the class, instance.classifier is a string
@f = Foo.find(params[:id])
@f.classifier.class # is String
I was under the impression that Rails / ActiveRecord would magically deserialize my classifier for me. Is there some setting I need to tweak or am I misunderstanding something?