Martin Guetlein
unread,May 5, 2011, 4:07:10 AM5/5/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ohm Ruby
Hi all,
one more thing. I know thats not how redis is supposed to be used,
anyway, is there a more elegant way to store some arbitrary object in
a model? (see my approach below)
Regards,
Martin
MyModel < Ohm::Model
attribute :simple_attribute
attribute :arbitrary_object_serialized
def arbitrary_object
YAML.load(arbitrary_object_serialized)
end
def arbitrary_object=(o)
arbitrary_object_serialized = o.to_yaml
end
end