Well, you could just generate the whole HTML string and store it, but I
assume that you want me to see "Vinay" and Vinay to see "you" for the
same message, so that won't quite work.
>
> whats the best strategy for this? scrap what I have done and please
> suggest ideas on how you might approach this problem. one thing I DO
> NOT want to do is dynamically generate those messages in the view. I
> just think it will be too much load on the db AND rendering action
> itself as compared to storing the message and applying the links
> dynamically on retrieval somehow.
This may well be premature optimization.
>
> thoughts? ideas? suggestions?
>
> thanks..
Take a leaf out of Facebook's book. Use an intermediate representation
in the DB: something like "[user 110] created project Acme". Then parse
that when the view is created, so that user 110 sees "you" and everyone
else sees user 110's name.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.
Why are you assuming that? It may be a good idea, or it may not.
> I will have to generate the message in
> either the controller or view right? was hoping i could generate the
> message in the model keeping the controller clean.
>
Generate the intermediate representation in the model and store it in
the DB. Parse it (probably with a model method, or else a helper) when
you render the view. I don't see why you need to put too much in the
controller.
> anyway, ill get on that.
> anymore ideas or suggestions?
Best,