I was wondering if I could post to two different URLs with one click of a button?
What I am trying to accomplish is to make a birthday website for my friend. People could come on site and write something about him. To keep things organized, I made two models, User and Message. Now, what I am trying to accomplish if to be able to give a single form which takes User data (name and email) and Message (description) and updates both the tables. Thanks in advance.
I am willing to do stuff from javascript too! But I haven’t studied any javascript as such so if it is possible with JavaScript, please provide clear instructions too. Thanks!
You can use models in others controllers just, define it on controller
usesarray like}
Or if models are related, it’s better to take through relationship like
You should read documentation model asociations to understand how basic model works.
To answer your question how to call another url there is requestAction but use it with caution, because it takes all way through bootsrap process, so it’s slow.