Module: Sanitize::Rails::ActionView

Defined in:
lib/sanitize/rails/action_view.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/sanitize/rails/action_view.rb', line 4

def self.included(base)
  base.class_eval do
    # To make sure we're called *after* the method is defined
    undef_method :sanitize

    # Overrides ActionView's sanitize() helper to use +Engine#clean+
    #
    # FIXME: Options are currently ignored.
    #
    def sanitize(string, options = {})
      Engine.clean(string)
    end
  end
end