diff options
author | Leonel Galán <leonel@getstealz.com> | 2017-04-25 10:39:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 10:39:46 -0500 |
commit | f5b2a0ef408f01dd9f12b456f5e4bb41ebb4cb76 (patch) | |
tree | 4afabfef205d5fbd546946a16bc6cf5eb36279e9 /guides/rails_guides | |
parent | 8648f289f01656b2258687126108c389127108e0 (diff) | |
parent | b32d64df5e5160e25804c7019e2da76bd115f3a6 (diff) | |
download | rails-f5b2a0ef408f01dd9f12b456f5e4bb41ebb4cb76.tar.gz rails-f5b2a0ef408f01dd9f12b456f5e4bb41ebb4cb76.tar.bz2 rails-f5b2a0ef408f01dd9f12b456f5e4bb41ebb4cb76.zip |
Merge branch 'master' into bug/filtered_parameters_class
Diffstat (limited to 'guides/rails_guides')
-rw-r--r-- | guides/rails_guides/markdown.rb | 2 | ||||
-rw-r--r-- | guides/rails_guides/markdown/renderer.rb | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index 16aaa7d1eb..02d58601c4 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -106,7 +106,7 @@ module RailsGuides end end - doc.css('h3, h4, h5, h6').each do |node| + doc.css("h3, h4, h5, h6").each do |node| node.inner_html = "<a class='anchorlink' href='##{node[:id]}'>#{node.inner_html}</a>" end end.to_html diff --git a/guides/rails_guides/markdown/renderer.rb b/guides/rails_guides/markdown/renderer.rb index 20cbd568c9..9d43c10be6 100644 --- a/guides/rails_guides/markdown/renderer.rb +++ b/guides/rails_guides/markdown/renderer.rb @@ -94,15 +94,15 @@ HTML tree = version || edge root = file_path[%r{(.+)/}, 1] - path = case root - when "abstract_controller", "action_controller", "action_dispatch" - "actionpack/lib/#{file_path}" - when /\A(action|active)_/ - "#{root.sub("_", "")}/lib/#{file_path}" - else - file_path - end - + path = \ + case root + when "abstract_controller", "action_controller", "action_dispatch" + "actionpack/lib/#{file_path}" + when /\A(action|active)_/ + "#{root.sub("_", "")}/lib/#{file_path}" + else + file_path + end "https://github.com/rails/rails/tree/#{tree}/#{path}" end |