On Tue, Mar 1, 2011 at 10:52 AM, Jim Ruther Nill <[email protected]> wrote:
> > > On Tue, Mar 1, 2011 at 6:13 PM, Pale Horse <[email protected]> wrote: > >> The application I'm currently working on has a Glossary model. The >> Glossary table has columns for the term and its definition. >> >> The application also has Pages which have content. The content needs to >> highlight any words that match a term in the Glossary table. >> >> Why are you using the server to do this, when you could use client processor to do the matching for you. NOTE: He just wants to highlight them and not show them as links. If it had been links, I would have completely agreed with your approach. There'll be a few ways to do this but I'd appreciate your advice on the >> way you'd accomplish this. >> >> > create a helper that would parse the content of the page and would auto > link > if a certain term corresponds to a glossary record. > > if the pages are gonna be hit quite a lot, i suggest caching the list of > words so > you minimize the number of hits to the db. > > > >> -- >> >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: 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/rubyonrails-talk?hl=en. >> >> > > > -- > ------------------------------------------------------------- > visit my blog at http://jimlabs.heroku.com > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: 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/rubyonrails-talk?hl=en. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: 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/rubyonrails-talk?hl=en.

