# Calling custom active resource methods/actions

**URL:** <https://www.ruby-forum.com/t/calling-custom-active-resource-methods-actions/111947>\
**Category:** Rails\
**Created:** [August 13, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/calling-custom-active-resource-methods-actions/111947 "2007-08-13T19:46:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![misleb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@misleb](https://www.ruby-forum.com/u/misleb)\
**Post date:** [August 13, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/calling-custom-active-resource-methods-actions/111947/1 "2007-08-13T19:46:50Z")

</div>

Hi, I’m trying to work with active resources in Edge, but I’m having a  
difficult time trying to figure out the proper way to call custom  
methods/actions. I have things setup so I can do the standard finds and  
updates, but any custom method just doesn’t work. My model:

class HomeroomUser \< ActiveResource::Base  
self.site = ‘[http://calamari:samplesize@localhost:3001/](http://calamari:samplesize@localhost:3001/)’  
end

I want to call the “authenticate” action in the other rails application.  
I tried

HomeroomUser.post(:authenticate, :login =\> ‘someuser’, :password =\>  
‘somepass’)

It should return a HomeroomUser object if successful, but it only  
returns an object like #\<Net::HTTPOK 200 OK readbody=true\>. I know the  
correct action is called on the other end and data is returned, but  
ActiveResource::Base doesn’t seem to be converting it from XML.

-matthew
