search for: new_link_array

Displaying 1 result from an estimated 1 matches for "new_link_array".

2010 Mar 03
0
Using gsub to replace text with link from database
...the Yankees" and I click submit. I want the output to return the same sentence, but with the link of Derek Jeter and Jorge Posada. This is where I''m at: #This code is taking the sentence and scanning it for two words that are next to each other that have the first letter capitalized @new_link_array = #this is the link data that is returned from my query search via ferret. It will provide the proper link to the players. @full_text = params[:q] @full_text_array = @full_text.scan(/([A-Z]+[a-zA-Z]* [A-Z]+[a-zA-Z]*)/) @full_text_array.each_with_index do |original_name, i| @full_text.gsub!(o...