mongoid/mongoid — pull request #3123 by dru (2013-06-24 18:42:26+00:00)
Title: Fix polymorphic has_many 

Fix polymorphic has_many class name to correspont to builder class name:

How to reproduce error:

class Product; has_many :addresses, as: 'addressable'; end

class SuperProduct < Product; end;

super_product.addresses.build # sets addressable_type: "Product" for address

super_product.addresses #generates selector "addressable_type"=>"SuperProduct"

after fix:

SuperProduct.addresses #generates selector "addressable_type"=>"Product"}