# Overloaded has\_many\_polymorphs method is still being called

**URL:** <https://www.ruby-forum.com/t/overloaded-has-many-polymorphs-method-is-still-being-called/131042>\
**Category:** Rails\
**Created:** [March 5, 2008, 2:19pm UTC](https://www.ruby-forum.com/t/overloaded-has-many-polymorphs-method-is-still-being-called/131042 "2008-03-05T14:19:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [March 5, 2008, 2:19pm UTC](https://www.ruby-forum.com/t/overloaded-has-many-polymorphs-method-is-still-being-called/131042/1 "2008-03-05T14:19:09Z")

</div>

I have a has\_many\_polymorphs class called Property. For the various  
classes that are polymorphs, i’ve written a module with methods relating  
to Property, that they can all include.

One of my methods is called ‘add\_properties’: it creates some new  
associations, but also does a couple of other things (such as update the  
object’s ferret index, and return a boolean instead of the added  
objects).

However, it looks as if has\_many\_polymorphs generates a method called  
'add\_#{your h\_m\_p class here), which does the same sort of thing.  
That’s fair enough, but it’s being called instead of the version in my  
module. Shouldn’t my own custom version of this method override the  
h\_m\_p version? And can/should i go and strip the generated method out  
of my local install h\_m\_p?

thanks  
max
