Habtm and :uniq

Hi

I wonder what the state of this ticket is:

http://dev.rubyonrails.org/ticket/2019

Does anyone have information regarding whether there are plans to fix
this behaviour? It seems strange to me to force uniqueness in Ruby
(i.e. application code) but not in the database.

For example, in activerecord/lib/active_record/associations/
has_and_belongs_to_many_association.rb there is a line which reads

@reflection.options[:uniq] ? uniq(records) : records

This would be superflous if the “<<” operator checked for uniqueness.

I’d be grateful for any information on this topic.

Thanks,

Manuel H.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs