aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/sanitize_helper.rb
diff options
context:
space:
mode:
authorT.J. Schuck <tj@getharvest.com>2015-01-16 16:06:34 -0500
committerT.J. Schuck <tj@getharvest.com>2015-01-20 14:19:44 -0500
commit4d476ff223924e4265e5a9b480dfe6114412b257 (patch)
tree07de65087a616aeefd5907951e3f0715d4f04f07 /actionview/lib/action_view/helpers/sanitize_helper.rb
parentb06b1d16ab247785b64bdacbda959a32daebe387 (diff)
downloadrails-4d476ff223924e4265e5a9b480dfe6114412b257.tar.gz
rails-4d476ff223924e4265e5a9b480dfe6114412b257.tar.bz2
rails-4d476ff223924e4265e5a9b480dfe6114412b257.zip
Fix code formatting in sanitize docs
Diffstat (limited to 'actionview/lib/action_view/helpers/sanitize_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/sanitize_helper.rb20
1 files changed, 11 insertions, 9 deletions
diff --git a/actionview/lib/action_view/helpers/sanitize_helper.rb b/actionview/lib/action_view/helpers/sanitize_helper.rb
index e72e85ee5f..f95b83b3b2 100644
--- a/actionview/lib/action_view/helpers/sanitize_helper.rb
+++ b/actionview/lib/action_view/helpers/sanitize_helper.rb
@@ -31,19 +31,21 @@ module ActionView
# (supply a Loofah::Scrubber that does the sanitization)
#
# scrubber can either wrap a block:
- # scrubber = Loofah::Scrubber.new do |node|
- # node.text = "dawn of cats"
- # end
#
- # or be a subclass of Loofah::Scrubber which responds to scrub:
- # class KittyApocalypse < Loofah::Scrubber
- # def scrub(node)
+ # scrubber = Loofah::Scrubber.new do |node|
# node.text = "dawn of cats"
# end
- # end
- # scrubber = KittyApocalypse.new
#
- # <%= sanitize @article.body, scrubber: scrubber %>
+ # or be a subclass of Loofah::Scrubber which responds to scrub:
+ #
+ # class KittyApocalypse < Loofah::Scrubber
+ # def scrub(node)
+ # node.text = "dawn of cats"
+ # end
+ # end
+ # scrubber = KittyApocalypse.new
+ #
+ # <%= sanitize @article.body, scrubber: scrubber %>
#
# A custom scrubber takes precedence over custom tags and attributes
# Learn more about scrubbers here: https://github.com/flavorjones/loofah