Couple of small updates to Bookie, the most interesting of which was to filter the “Recent Searches” list to exclude filthy words. Timo was both the cause of the problem and suggested the solution. Thanks. I think ;-)

Here’s how it used to look:

( Note: It’s searching the book prices as they maintain an “updated at” value )

Price.find(:all).sort_by {|p| p.updated_at }.reverse.collect {|p| p.book}.uniq.compact.slice(0..14)

To filter out books with bad words in their title, I changed it to this:

Price.find(:all).sort_by {|p| p.updated_at }.reverse.collect {|p| p.book}.uniq.delete_if { |b| b.title =~ / shit| piss| cunt/i }.compact.slice(0..14)

Adding the following will delete the Books containing rude words:

.delete_if { |b| b.title =~ / shit| piss| dick/i }

How sweet is that? You can practically read it like a sentence.