Customizing save or moving a method for better design?

Damaris Fuentes
Tue, 02 Jan 2007 21:53:26 -0000

Hi you all, I have a "wiki_controller" which gets the page''s
title,
summary, and content, stored them in a "Page" model However, I have to
do a kind of parsing in the content to recover annotations made by the
user, and stored them in the "Annotation" model.
I do this with a method located in the "wiki_controller", which
extracts
each annotation and save them one by one.

I wonder if I should move this method to the "annotation_controller",
or
if a should do the parsing when saving the page in the "Page" model,
for
what I would have to customize the default save that''s inside Rails for
model (can I?)

What would be the best option for a proper design?.

Thank you