aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Jian <tonytonyjan@gmail.com>2012-04-29 17:07:30 +0800
committerTony Jian <tonytonyjan@gmail.com>2012-04-29 17:07:30 +0800
commitbf7b8cf6b31837ee9751cd174f128022c0fc5bb4 (patch)
tree681436aa5d80ed5e4c9a867ccc891eab6852f124
parent70e0edf000289b1907b8aee386daf23577f6bc08 (diff)
downloadrails-bf7b8cf6b31837ee9751cd174f128022c0fc5bb4.tar.gz
rails-bf7b8cf6b31837ee9751cd174f128022c0fc5bb4.tar.bz2
rails-bf7b8cf6b31837ee9751cd174f128022c0fc5bb4.zip
Revert "Make non English title indexable (such as Chinese or Japanese) using MD5."
This reverts commit 70e0edf000289b1907b8aee386daf23577f6bc08.
-rw-r--r--guides/rails_guides/indexer.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/guides/rails_guides/indexer.rb b/guides/rails_guides/indexer.rb
index 1847f09881..89fbccbb1d 100644
--- a/guides/rails_guides/indexer.rb
+++ b/guides/rails_guides/indexer.rb
@@ -59,9 +59,8 @@ module RailsGuides
def title_to_idx(title)
idx = title.strip.parameterize.sub(/^\d+/, '')
- if idx.blank?
- puts "BLANK ID: please put an explicit ID for section #{title}, as in h5(#my-id)" if warnings
- idx = ("id-"+Digest::MD5.hexdigest(title.strip)).parameterize.sub(/^\d+/, '')
+ if warnings && idx.blank?
+ puts "BLANK ID: please put an explicit ID for section #{title}, as in h5(#my-id)"
end
idx
end