aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/rails_guides/indexer.rb
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2009-04-04 16:13:18 +1000
committerRyan Bigg <radarlistener@gmail.com>2009-04-04 16:13:18 +1000
commite878c3e44a8dba19c1188b636e25ec1bc2165116 (patch)
tree3d06b83492653b6b73422cbf37014fc5c89e9685 /railties/guides/rails_guides/indexer.rb
parentab55ddcc4c5cf31bcaf7720b52dc55d6d54cb150 (diff)
parent9e9469e83f6144310115124cdecc5cb65db5128e (diff)
downloadrails-e878c3e44a8dba19c1188b636e25ec1bc2165116.tar.gz
rails-e878c3e44a8dba19c1188b636e25ec1bc2165116.tar.bz2
rails-e878c3e44a8dba19c1188b636e25ec1bc2165116.zip
Merge branch 'master' of git@github.com:lifo/docrails
* 'master' of git@github.com:lifo/docrails: (319 commits) deletes screencast promo in prologue, its proper place is the References section Typo fix list -> index in caching guide, RESTifies some examples, revised conventions here and there Tech edit of caching guide from Gregg Pollack Fix typo in comment: hide_actions -> hide_action Fix two typos in a comment in config/initializers/backtrace_silencers.rb With -> with in a title Clear up a little confusing wording in Routing Guide. copyedited minor details in the rack on rails guide remove piece of UrlWriter documentation claiming that you can access named routes as its class methods Add note about change to session options TRUNCATE is also a MySQL DDL statement, so document this is a possible caveat when using transactions and savepoints. Improve documentation for ActiveResource::Validations, fix typos Fix typos in ActiveResource::Base documentation, use present tense, reword confusing sentences Update ActiveResource::Connection documentation to use present tense Fix typos in Active Resource README Fix a small typo ensure authors get warnings about broken links, and ensure end users don't in guides generator, warn about duplicate header IDs only if WARN_DUPLICATE_HEADERS ...
Diffstat (limited to 'railties/guides/rails_guides/indexer.rb')
-rw-r--r--railties/guides/rails_guides/indexer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/rails_guides/indexer.rb b/railties/guides/rails_guides/indexer.rb
index 7cb254d0b0..5b5ad3fee1 100644
--- a/railties/guides/rails_guides/indexer.rb
+++ b/railties/guides/rails_guides/indexer.rb
@@ -29,7 +29,7 @@ module RailsGuides
return level_hash
elsif level == current_level
index = counters.join(".")
- bookmark = '#' + title.gsub(/[^a-z0-9\-_]+/i, '').underscore.dasherize
+ bookmark = '#' + title.strip.downcase.gsub(/\s+|_/, '-').delete('^a-z0-9-')
raise "Parsing Fail" unless @result.sub!(matched, "h#{level}(#{bookmark}). #{index}#{title}")