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

Ticket #11488 (new defect)

Opened 2 months ago

Last modified 2 months ago

[PATCH] :uniq option of a habtm association is ignored when find is called

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

Description

If you call find (or any dynamic find method) over a has_and_belongs_to_many_association with the option :unique => true, the :unique option would be ignored.

Tests and patch attached

Attachments

habtm_uniq_with_find.diff (3.0 kB) - added by cavalle on 03/31/08 19:47:04.

Change History

03/31/08 19:47:04 changed by cavalle

  • attachment habtm_uniq_with_find.diff added.

03/31/08 20:06:27 changed by miloops

+1 works for me.