I have been using ActiveResource in my Ruby on Rails applications for some time, and I am starting to feel that it needs final Polish to make it move from “pretty nice” to “pretty.”
I would like to be able to use ActiveResource as if it were ActiveRecord. If I could use has\_many
, belongs\_to
and other details with the help of ActiveResources, it would have made my life.
So, I looked around the plugin to do this, but he was not lucky to find it. Has anyone written one? Does anyone know about the current project?
Raison d'être
Let's say I have an application that controls Users
, and another application that controls UserRequests
. I would like to avoid any cyclical dependency between my applications, so I decided that the application Users
is not fully aware of the concept UserRequests
. But, of course, a UserRequest
must belong to a User
, and a User
must have a lot UserRequests
.
So, in the application, Users
all I have is User
ActiveRecord, with all the necessary controller elements, to make it useful with ActiveResource.
Complex material is in the app UserRequests
. I have UserRequest
ActiveRecord and User
ActiveResource. I would like to code the fact that UserRequest
belongs_to
Custom ActiveResource and User
ActiveResource has_many
UserRequests
.
, (ActiveRecord has_many
ActiveResources ActiveResource belongs_to
ActiveRecord).