Permalink
Browse files

update html_safe calls in guides generation

  • Loading branch information...
1 parent fdcf4d6 commit 9b5dae7af5757769c1e69d74a59ff036adc1f30f @fxn fxn committed Feb 2, 2010
Showing with 5 additions and 11 deletions.
  1. +4 −10 railties/guides/rails_guides/generator.rb
  2. +1 −1 railties/guides/source/layout.html.erb
@@ -1,11 +1,5 @@
require 'set'
-class String
- def html_safe!
- self
- end unless "post 9415935902f120a9bac0bfce7129725a0db38ed3".respond_to?(:html_safe!)
-end
-
module RailsGuides
class Generator
attr_reader :output, :view_path, :view, :guides_dir
@@ -61,7 +55,7 @@ def generate_guide(guide)
body = set_header_section(body, @view)
body = set_index(body, @view)
- result = view.render(:layout => 'layout', :text => textile(body).html_safe!)
+ result = view.render(:layout => 'layout', :text => textile(body).html_safe)
f.write result
warn_about_broken_links(result) if ENV.key?("WARN_BROKEN_LINKS")
end
@@ -77,8 +71,8 @@ def set_header_section(body, view)
header = textile(header)
- view.content_for(:page_title) { page_title.html_safe! }
- view.content_for(:header_section) { header.html_safe! }
+ view.content_for(:page_title) { page_title.html_safe }
+ view.content_for(:header_section) { header.html_safe }
new_body
end
@@ -109,7 +103,7 @@ def set_index(body, view)
index << '</ol>'
index << '</div>'
- view.content_for(:index_section) { index.html_safe! }
+ view.content_for(:index_section) { index.html_safe }
i.result
end
@@ -87,7 +87,7 @@
<div id="container">
<div class="wrapper">
<div id="mainCol">
- <%= yield.html_safe! %>
+ <%= yield.html_safe %>
</div>
</div>
</div>

0 comments on commit 9b5dae7

Please sign in to comment.