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

Ticket #10188 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] attr_readonly is ignored when used in conjunction with optimistic locking

Reported by: nbugajski Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords:
Cc:

Description

Optimistic locking overrides the ActiveRecord.update method. This method retrieves the list of attributes to update without requesting that the read-only attributes be removed from the list.

The intent of attr_readonly seems to be that changes to the read-only attributes will not be saved on any update, regardless of using locking or not.

Attachments

attr_readonly_with_optimistic_locking.diff (1.9 kB) - added by nbugajski on 11/16/07 18:36:16.

Change History

11/16/07 18:36:16 changed by nbugajski

  • attachment attr_readonly_with_optimistic_locking.diff added.

11/16/07 20:31:34 changed by bitsweat

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

(In [8156]) attr_readonly behaves well with optimistic locking. Closes #10188.