Module: SanitizeAttributes
- Includes:
- Macros
- Defined in:
- lib/sanitize_attributes.rb,
lib/sanitize_attributes/macros.rb,
lib/sanitize_attributes/version.rb,
lib/sanitize_attributes/class_methods.rb,
lib/sanitize_attributes/instance_methods.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods, Macros Classes: NoSanitizationMethodDefined, Railtie
Constant Summary collapse
- VERSION =
"0.0.2"
Class Attribute Summary collapse
-
.default_sanitization_method ⇒ Object
Returns the value of attribute default_sanitization_method.
Class Method Summary collapse
Methods included from Macros
Class Attribute Details
.default_sanitization_method ⇒ Object
Returns the value of attribute default_sanitization_method.
9 10 11 |
# File 'lib/sanitize_attributes.rb', line 9 def default_sanitization_method @default_sanitization_method end |
Class Method Details
.hook! ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/sanitize_attributes.rb', line 11 def hook! if ActiveSupport.respond_to?(:on_load) ActiveSupport.on_load(:active_record) { extend SanitizeAttributes } else # Rails 2 fallback ActiveRecord::Base.class_eval { extend SanitizeAttributes } end end |