I know the recurrence rule IS serializing... because I can load it up
in the console using
>> yaml_of_model_relevant_events = MyModel.find(39).events_before_type_cast
=> "--- \n- &id001 !ruby/object:RiCal::Component::Event \n
attach_property: []\n\n attendee_property: \n - !ruby/
object:RiCal::PropertyValue::CalAddress \n params: {}\n\n
timezone_finder: *id001\n value:
cale...@gmail.com\n
categories_property: []\n\n comment_property: []\n\n
contact_property: []\n\n description_property: !ruby/
object:RiCal::PropertyValue::Text \n params: {}\n\n
timezone_finder: *id001\n value: scheduled reminders for Blood
Pressure\n dtstart_property: !ruby/
object:RiCal::PropertyValue::DateTime \n date_time_value: !ruby/
object:RiCal::FastDateTime \n date: 2009-11-13\n hour:
11\n min: 25\n offset: 0\n sec: 39\n
secs_since_bod: 41139\n params: \n TZID: :default\n
rational_tz_offset: \n timezone: \n timezone_finder: *id001\n
tzid: UTC\n utc: \n exdate_property: []\n\n exrule_property: []\n
\n parent: \n rdate_property: []\n\n related_to_property: []\n\n
request_status_property: []\n\n resources_property: []\n\n
rrule_property: \n - !ruby/
object:RiCal::PropertyValue::RecurrenceRule \n by_list_hash: \n
errors: \n freq: daily\n params: {}\n\n timezone_finder:
*id001\n"
*good! this shows the RecurrenceRule model at the end. Note that I
have a column named 'events' which holds RiCal events... there is no
rails-level Event model.
HOWEVER... when i try to YAML.load this serialized string, it does NOT
recreate the rrule
YAML.load(yaml_of_model_relevant_events)
=> [#<RiCal::Component::Event:0x373b060 @resources_property=[],
@dtstart_property=2009/11/13 11:25:39 0:UTC, @rdate_property=[],
@comment_property=[], @parent=nil,
@description_property=#<RiCal::PropertyValue::Text:0x373a778 @params=
{}, @value="scheduled reminders for Blood Pressure",
@timezone_finder=#<RiCal::Component::Event:0x373b060 ...>,
contact_property[], attach_property[], related_to_property[],
exrule_property[], attendee_property
[#<RiCal::PropertyValue::CalAddress:0x373acb4 @params={},
@value="
cale...@gmail.com",
@timezone_finder=#<RiCal::Component::Event:0x373b060 ...>],
categories_property[], rrule_propertynil, exdate_property[],
request_status_property[]]
I'm hoping I just fail to understand how to use serialize or something
simple like that....