I am working on an Android application which has MySql as database and used rails for server side code. I have been able to add new records into DB through default methods created in controller. Now I need to update a column value in table based on updates received for another table from my application. Say, I get number of rows to insert in "Orders" table and when I do the insert for this, I have to update another table as Order "received". I understand that I may have to implement this logic in Active record but not sure how to do this. I researched a lot and read quite a few rails tutorials but unable to find solution which will work. Basically I am confused how to link Model and controller class. Till now I have passed url in my application which comes directly to controller and DB is updated. But now I have to extract some values from the json received and then update another table.
Also when I receive my the order, I have to push this order to another client. So not sure how to push this.
I am totally a beginner in rails so not sure how to implement this. Sincere apologies if it sound a basic question for this forum but after a thorough research I couldn't get a solution. Would be great if someone can provide relevant pointers. Thanks.