On Dec 13, 10:50 pm, mwlang88 <[email protected]> wrote: > Thanks, Jeremy > > I was able to get an after_save callback working roughly following > your suggestions. > > One thing I noticed was that if I updated page.slug_id (per your > example), then my bacon test scripts tended to think page.slug never > changed. but if I updated page.slug instead, then the bacon scripts > recognized both page.slug and page.slug_id changed. > > Was I bumping up against some caching mechanism, perhaps?
Yes. If you already have a cached value for slug, you can just do self.slug = add_slug(...) instead of self.slug_id = add_slug(...).id. That should fix the caching issue. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en.
