Has anyone written a plugin to add a finale to ActiveResource?

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\_toand 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 Usersis not fully aware of the concept UserRequests. But, of course, a UserRequestmust belong to a User, and a Usermust have a lot UserRequests.

So, in the application, Usersall I have is UserActiveRecord, with all the necessary controller elements, to make it useful with ActiveResource.

Complex material is in the app UserRequests. I have UserRequestActiveRecord and UserActiveResource. I would like to code the fact that UserRequest belongs_toCustom ActiveResource and UserActiveResource has_many UserRequests.

, (ActiveRecord has_many ActiveResources ActiveResource belongs_to ActiveRecord).

+3
2

Hyperactive Resource. ... .

, , . , , "ActiveResource ++", ActiveResource. "SexyResource" "HyperactiveResource", , . HyperactiveResource... , - . , - . . ! - , , ?; -)

+2

- Roxy. :

, Roxy ActiveRecord- ActiveResource.

, , , Roxy.

+2

Source: https://habr.com/ru/post/1702722/


All Articles