Re: Customizing save or moving a method for better design?

Damaris Fuentes
Thu, 04 Jan 2007 19:47:59 -0000

> Uh, why? Why not store raw Wiki markup in just one model?

Um, I don''t understand you :( I store the content in the Page model, as
an attribute.

The annotations written by the users in the way, let''s say, "blah
blah
{{my annotation}} bla bla blah", are extracted from that same content
and stored in the Annotation model.
The "extract" action is made in the Wiki controller (associated with
Page model). Answers to the other post I made told me it would be better
to set that action in the Annotation model. However, as I do the
extraction after saving the page, I was wondering if I should do the
action in the "save" method of Page model (not Annotation), and if I
could, for that purpose, modify the "save" method of activeRecord by
default in Page model.

Thnaks again :D