diff options
author | T.J. Schuck <tj@getharvest.com> | 2015-01-16 16:06:34 -0500 |
---|---|---|
committer | T.J. Schuck <tj@getharvest.com> | 2015-01-20 14:19:44 -0500 |
commit | 4d476ff223924e4265e5a9b480dfe6114412b257 (patch) | |
tree | 07de65087a616aeefd5907951e3f0715d4f04f07 /actionview/lib | |
parent | b06b1d16ab247785b64bdacbda959a32daebe387 (diff) | |
download | rails-4d476ff223924e4265e5a9b480dfe6114412b257.tar.gz rails-4d476ff223924e4265e5a9b480dfe6114412b257.tar.bz2 rails-4d476ff223924e4265e5a9b480dfe6114412b257.zip |
Fix code formatting in sanitize docs
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/sanitize_helper.rb | 20 |
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 |