Ticket #2 (new enhancement)

Opened 1 year ago

Last modified 1 year ago

patch to integrate with WhiteListHelper and improve performance

Reported by: anonymous Assigned to: somebody
Priority: major Component: component1
Keywords: Cc:

Description

Changes are:

1. If WhiteLabel? plugin is present it will be used for sanitizing. In order for this to happen, acts_as_sanitized should be installed in plugins/whitelist_acts_as_sanitized folder, so that it gets loaded after the WhiteList? plugin.

2. Instead of sanitizing before_save or before_validation, it happens whenever the attribute is assigned, by intercepting the write_attribute method. This will prevent the expensive reg exps from being executed every time the model is saved, which may degrade performance in some cases.

3. Use of TextHelperWrapper? prevent polution of the model's namespace by the methods from TextHelper?.

Let me know if this makes sense :)

Attachments

acts_as_sanitized.diff (2.9 kB) - added by ant..@planyp.us on 09/16/07 20:41:54.
acts_as_sanitized.2.diff (6.6 kB) - added by ant..@planyp.us on 09/27/07 19:53:59.
fixed setting model properties to nil and using symbols in acts_as_sanitized calls in models

Change History

09/16/07 20:41:54 changed by ant..@planyp.us

  • attachment acts_as_sanitized.diff added.

09/27/07 19:53:59 changed by ant..@planyp.us

  • attachment acts_as_sanitized.2.diff added.

fixed setting model properties to nil and using symbols in acts_as_sanitized calls in models

09/27/07 19:54:35 changed by ant..@planyp.us

please use the second patch!


Add/Change #2 (patch to integrate with WhiteListHelper and improve performance)




Change Properties
Action