# Method name collision between cache-money & httparty

**URL:** <https://www.ruby-forum.com/t/method-name-collision-between-cache-money-httparty/190710>\
**Category:** Rails\
**Created:** [June 25, 2010, 12:21pm UTC](https://www.ruby-forum.com/t/method-name-collision-between-cache-money-httparty/190710 "2010-06-25T12:21:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@jack](https://www.ruby-forum.com/u/jack)\
**Post date:** [June 25, 2010, 12:21pm UTC](https://www.ruby-forum.com/t/method-name-collision-between-cache-money-httparty/190710/1 "2010-06-25T12:21:57Z")

</div>

I have a model that calls:

include HTTParty

but also gets cached using cache-money. It seems that they both add a  
“get” method to ActiveRecord, and they collide when I try to use both  
of them.

What’s the best way to fix this? If it’s a namespace of some kind, how  
do I set up httparty so that I have to call HTTParty::get instead of  
plain “get”? Is there a way to dynamically rename the method after  
the include defines it, in which case I could just call it “http\_get”  
instead of just “get”?

When I manually go in and rename the method name in the httparty  
source, things seem OK, but I’d rather not go that route.

I’m using the ngmoco version of cache-money, which lets me specify  
which models get cached. When I turn off caching for that one model,  
things are fine. But that also lets me decide the order that the  
mixins happen, if that’s helpful, so I can include httparty before or  
after I turn on caching for that model.

Any help/suggestions are appreciated!

Jack
