Old Emmanuel Oga's Weblog (new one is at www.emmanueloga.com)

ActiveResource

Posted in ActiveResource, rails, rest, Uncategorized by emmanueloga on enero 21, 2008

I’m making my first contributions to rails. All of them deal with ActiveResource, a rails related library engineered to consume restful services.

It behaves more or less the same way as an ActiveRecord (even though it is NOT a replacement for ActiveRecords). With these in mind, I proposed these patches (not surprisingly some of them where already informed issues in the rails trac):

  • Ticket 7308 Addition of update_attributes method
  • Ticket 10537 Addition of new_record? method
  • Ticket 9862 Modificate behavior for #new (initialize) , patch not provided yet (waiting for opinions)

If this patches where applied, one would be able to seamlessly replace an ActiveRecord with an ActiveResource in a scaffolded CRUD, restful web app (I used rails 2.0.2 and the scaffold provided with rspec 1.1.1 rspec_scaffold generator. Not sure if it works the same way as “scaffold” generator on rails).

Tagged with:

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

A %d blogueros les gusta esto: