Bug in associations or not? def has_many if options[:through] collection_reader_method(reflection, HasManyThroughAssociation) <--- FIRST CALL collection_accessor_methods(reflection, HasManyThroughAssociation, false) <-- CALLED AGAIN INSIDE THIS METHOD else .... def collection_accessor_methods(reflection, association_proxy_class, writer = true) collection_reader_method(reflection, association_proxy_class) <-- SECOND CALL WITH SAME ARGUMENTS .... Looks like collection_reader_method is being called twice with the same arguments. Bob Silva --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> def has_many > if options[:through] > collection_reader_method(reflection, > HasManyThroughAssociation) <--- FIRST CALL > collection_accessor_methods(reflection, > HasManyThroughAssociation, false) <-- CALLED AGAIN INSIDE THIS METHOD > else > .... > > > > > def collection_accessor_methods(reflection, association_proxy_class, > writer = true) > collection_reader_method(reflection, > association_proxy_class) <-- SECOND CALL WITH SAME ARGUMENTS > .... > > > > Looks like collection_reader_method is being called twice with the > same arguments.This certainly looks strange, did you try removing it? Did the tests still pass? -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Possibly Parallel Threads
- Assigning to the foreign key on a belongs_to association
- Counterintuitive behavior in ActiveRecord I was implementing dirty checking for an application, and I found something that is a little counterintuitive. Let me start with a quick quiz: bob=User.find(1) alice=User.find(2) trip=Trip.new trip.driver=bob old_
- Error on update_attributes with HABTM relationship
- undefined method 'each' in acts_as_taggable_on with rails 3 beta 3 and ruby 1.9
- changing the default behaviour of to_xml for has-many: associations