-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
I have a owner model:
class Person < ActiveRecord::Base
has_many_polymorphs :things, :from => [ :books, :cds, :dvds ], :through => :person_things
end
a relationship model:
class PersonThing < ActiveRecord::Base
belongs_to :person
belongs_to :thing, :polymorphic => true
end
and several owned models:
class Book < ActiveRecord::Base
end
...
If I create a relationship:
person = Person.create!(:name => 'Barney')
book = Book.create!('Dinosaurs for Dummies')
person.things << book
then include? fails even when select doesn't:
person.things.include? book
# => false
person.things.select { |t| t == book }.any?
# => true
I'm guessing include? is redefined on this enumeration, but it's not redefined correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels