vendor/plugins/cross_site_sniper/lib/cross_site_sniper.rb
# Piggybacks onto the end of ActiveRecord's define_attribute_methods
# to wrap and automatically html_escape string and text fields.
Piggybacks onto the end of ActiveRecord's define_attribute_methods
to wrap and automatically html_escape string and text fields.
Piggybacks onto the end of ActiveRecord ' s define_attribute_methods to wrap and automatically html_escape string and text fields .
def method_missing(method_sym,*args,&blk)
        if method_sym.to_s[/(.+)_without_html_escaping/]
          original_method = $1
          @html_escaping_disabled = true
          val = self.send(original_method)
          @html_escaping_disabled = false
          return val
        else
          super
        end
      end
def method_missing ( method_sym , * args , & blk ) if method_sym . to_s [ / (.+)_without_html_escaping / ] original_method = $1 @html_escaping_disabled = true val = self . send ( original_method ) @html_escaping_disabled = false return val else super end end
Piggybacks onto the end of ActiveRecord's define_attribute_methods
to wrap and automatically html_escape string and text fields.
Piggybacks onto the end of ActiveRecord ' s define_attribute_methods to wrap and automatically html_escape string and text fields .
#catch without_html_escaping for non-column methods and simulate it
method_sym
<not_specific>
args
<not_specific>
blk
<not_specific>