From 4d476ff223924e4265e5a9b480dfe6114412b257 Mon Sep 17 00:00:00 2001 From: "T.J. Schuck" Date: Fri, 16 Jan 2015 16:06:34 -0500 Subject: Fix code formatting in sanitize docs --- .../lib/action_view/helpers/sanitize_helper.rb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'actionview') 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 -- cgit v1.2.3