How to get an activeresource object attributes?

Hey all,

I have an activeresource model Profile:

class Profile < ActiveResource::Base
self.site=“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

Patrick A. wrote:

Hey all,

I have an activeresource model Profile:

class Profile < ActiveResource::Base
self.site=“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? :slight_smile: I’d seriously
take a look at option 3.

On Aug 25, 2:55 pm, John M. [email protected]
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

essentialrails.com

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.