sunspot/sunspot — Issue #109: logical typo on frontpage of website
Author: vosechu
Created: 2011-10-18 21:06:33+00:00
State: open

this code is on the front page of the website but it has an error:

string :sort_title do
name.downcase.gsub(/^(an?|the)/, '')
end

with this regex things titled 'The Whatever' will have a leading space which will float it to the top, and things titled 'American Whatever' will float to the m's because the A will get stripped off the title. The trailing space is mandatory.

string :sort_title do
name.downcase.gsub(/^(an?|the)\ /, '')
end