# How to get an activeresource object attributes?

**URL:** <https://www.ruby-forum.com/t/how-to-get-an-activeresource-object-attributes/112964>\
**Category:** Rails\
**Created:** [August 25, 2007, 12:56am UTC](https://www.ruby-forum.com/t/how-to-get-an-activeresource-object-attributes/112964 "2007-08-25T00:56:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [August 25, 2007, 12:56am UTC](https://www.ruby-forum.com/t/how-to-get-an-activeresource-object-attributes/112964/1 "2007-08-25T00:56:01Z")

</div>

Hey all,

I have an activeresource model Profile:

class Profile \< ActiveResource::Base  
self.site=“[http://0.0.0.0:3002](http://0.0.0.0:3002)”  
end

I used to do Profile.new and this returned an object with all the  
Profile attributes but since newer versions of edge I don’t get the  
attributes anymore. Is this normal? is there a new way to get  
attributes?

thanx in advance

Pat

---

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [August 25, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/how-to-get-an-activeresource-object-attributes/112964/2 "2007-08-25T21:55:15Z")

</div>

Patrick A. wrote:

> Hey all,
> 
> I have an activeresource model Profile:
> 
> class Profile \< ActiveResource::Base  
> self.site=“[http://0.0.0.0:3002](http://0.0.0.0:3002)”  
> end
> 
> I used to do Profile.new and this returned an object with all the  
> Profile attributes but since newer versions of edge I don’t get the  
> attributes anymore. Is this normal? is there a new way to get  
> attributes?
> 
> thanx in advance
> 
> Pat

ActiveResource has been removed from the Rails Core in favor of REST.  
It took me quite a while to get my head around this decision, but I now  
agree with it. ActiveResource is supposedly being broken out into a  
plugin, but I don’t know if that has happened yet. Options are:

- Revert to the Stable Branch of Rails.
- If the plugin exists, install it.
- Use a RESTful function instead.

If I where you, and no one else was using your app yet, (If they were  
you’d be avoiding the untested code in Edge right? 🙂 I’d seriously  
take a look at option 3.

---

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [August 25, 2007, 10:02pm UTC](https://www.ruby-forum.com/t/how-to-get-an-activeresource-object-attributes/112964/3 "2007-08-25T22:02:14Z")

</div>

On Aug 25, 2:55 pm, John M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ActiveResource has been removed from the Rails Core in favor of REST.

I don’t think that’s correct. It’s ActionWebService that will be  
removed to a plugin.

Jeff

> **[Hey Daddio!](http://softiesonrails.com)**
>
> Home of Hey Daddio Software

[essentialrails.com](http://essentialrails.com)

---

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [August 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/how-to-get-an-activeresource-object-attributes/112964/4 "2007-08-25T23:06:57Z")

</div>

I’m using rails edge and ActiveResource is there, that’s not the  
problem I can use it with no problem. I can do CRUD and all. It’s just  
that the MyModel.new function doesn’t retrieve the attributes though  
it used to with a previous version of edge, so I have to specify the  
attributes manually. Hope I made my point clearer.
