Module: WhiteListHelper

Defined in:
lib/white_list/white_list_helper.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.mattr_accessor_with_default(name, value = nil) ⇒ Object



3
4
5
6
# File 'lib/white_list/white_list_helper.rb', line 3

def self.mattr_accessor_with_default(name, value = nil)
  mattr_accessor name
  self.send("#{name}=", value) if value
end

Instance Method Details

#white_list(html) ⇒ Object



24
25
26
# File 'lib/white_list/white_list_helper.rb', line 24

def white_list(html)
  Sanitize.clean(html, WhiteListHelper.settings)
end