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

Ticket #11156 (closed defect: fixed)

Opened 5 months ago

Last modified 4 months ago

[PATCH] Add readonly option to has_many :through associations

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

Description

In a previous ticket/patch [1] i added readonly option to all associations, today i was using the option in a has_many through association (a Organizer that has_many payments through registrations and should be readonly) and i found the feature isn't working.

Here is the patch with proper test (without documentation because is a part of the already documented has_many).

[1] http://dev.rubyonrails.org/ticket/11084

Attachments

add_readonly_option_to_has_many_through_associations.diff (2.5 kB) - added by miloops on 02/18/08 20:25:10.

Change History

02/18/08 20:25:10 changed by miloops

  • attachment add_readonly_option_to_has_many_through_associations.diff added.

02/18/08 20:33:57 changed by miloops

Sorry, didn't figure that the referenced link was gonna get linked to changeset 1.

02/19/08 20:42:17 changed by tpope

+1

02/19/08 20:49:59 changed by cch1

+1 Looks sane, passes tests.

02/21/08 22:20:42 changed by juanjo.bazan

  • keywords set to verified.

+1

03/07/08 11:45:10 changed by pratik

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

(In [8989]) Add :readonly option to HasManyThrough associations. Closes #11156 [miloops]