Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #348 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] validates_{confirmation,acceptance}_of should only happen when the virtual attributes are not nil

Reported by: dpiddy@gmail.com Assigned to: David
Priority: normal Milestone:
Component: ActiveRecord Version: 0.9.1
Severity: normal Keywords:
Cc:

Description

validates_{confirmation,acceptance}_of encapsulate the patterns of wanting to confirm attribute values and acceptance of agreements, respectively. These patterns are most useful when a UI is involved but when writing scripts and unit tests that only involve models they can add extra work. This patch changes their behavior so the validation only happens if the created virtual attributes are not nil.

Also included in the patch are tests and documentation tweaks.

Attachments

ar-conf_accept_nil.patch (4.1 kB) - added by dpiddy@gmail.com on 12/19/04 21:54:18.

Change History

12/19/04 21:54:18 changed by dpiddy@gmail.com

  • attachment ar-conf_accept_nil.patch added.

12/21/04 23:40:58 changed by david

  • status changed from new to closed.
  • resolution set to fixed.