I am new to Httparty. I have a simple rails application with its default methods, new, create for creating a new Model object. So basically if you consider the article controller as an example. First new method instantiates the Model by Model.new and then the partial form is called which asks user for data and upon submit it calls the controller create method. But my problem is that I want to call these methods remotely from the different rails application using Httparty. So I first call the new method, it then instantiates the remote model and returns it to the remote app. In the remote app I get the instance as json and I am not able to get it as Object model. So when I call the form_for there it gives me error as it accepts object model which is on a remote application for me and which is not local. Any solutions? Thanks a lot in advance.
Okay I resolved it using Httparty itself. One thing which was making problems for me was form_for which is bounded to the rails model. So I used another form then just posted data using Httparty and on the remote app (Server side) I just retrieved each field and persist it. Very simple. Now I am a fan of Httparty!
来源:https://stackoverflow.com/questions/10406428/sending-form-data-to-remote-rails-application-using-httparty