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.
相关问题
- Laravel Option Select - Default Issue
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- HTML form is not sending $_POST values
- How to use Control.FromHandle?
相关文章
- Ruby using wrong version of openssl
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
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!