aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-19 20:02:03 -0400
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-19 20:13:42 -0400
commit0871e5e5c1e6151a7ed3bdf7b22209ac11532b31 (patch)
tree2936e12b4d940a2ac69d3b4f81a1adf15a02c423 /guides/rails_guides
parentd862cb89837d78f2c0f59caa9541383c6a0314b9 (diff)
downloadrails-0871e5e5c1e6151a7ed3bdf7b22209ac11532b31.tar.gz
rails-0871e5e5c1e6151a7ed3bdf7b22209ac11532b31.tar.bz2
rails-0871e5e5c1e6151a7ed3bdf7b22209ac11532b31.zip
Fix all style guides violations
Closes #28382 Closes #28651
Diffstat (limited to 'guides/rails_guides')
-rw-r--r--guides/rails_guides/markdown.rb2
-rw-r--r--guides/rails_guides/markdown/renderer.rb18
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