# ActiveResource - 404 when resources use the :as parameter

**URL:** <https://www.ruby-forum.com/t/activeresource-404-when-resources-use-the-as-parameter/141522>\
**Category:** Rails\
**Created:** [June 26, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/activeresource-404-when-resources-use-the-as-parameter/141522 "2008-06-26T18:41:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darth\_ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Post date:** [June 26, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/activeresource-404-when-resources-use-the-as-parameter/141522/1 "2008-06-26T18:41:01Z")

</div>

Hi,

I have another question about ActiveResource.

In a REST server I have resources defined with the :as parameter, like:

map.resources :alerts, :as =\> ‘alertas’

But when I try an ActiveResource client to access that, it tries to  
access ‘/alerts.xml’, which returns a 404.

I tried defining the resource on the client too, but it seems it doesn’t  
pick that up.

Another option would be to change the ActiveResource client name to  
Alerta (instead of Alert), but that doesn’t seem like the right thing to  
do.

Yet another option would be to define two resources on the server, one  
without the :as parameter…

Also, as far as I could tell, there is no parameter I can set on the  
ActiveResource model aside from using :from on every call.

Is this a missing feature or am I approaching things incorrectly?

If it’s a missing feature, I’d be happy to try and create a patch, so  
what would be the best approach for it? That the client has a parameter  
that tells it which URL to use? That the server somehow communicates the  
URL to the client?

Thanks!

- Ivan V.
