THpubs THpubs - 9 months ago 58
Ruby Question

Is there a good Rails gem to update the database real-time securely using user input?

I need to update the right record in the database safely (without letting the user tampering with the data and updating the wrong record) in real time. So if the user enter some data to the input field, it should be sent to the server. Server need to update the data and send any validation errors back to the user. Is this possible and is there a good known gem for this?

Answer Source

There is no gem that will do all of that for you, you will need to use a frontend framework like angular/ember/react or roll your own with jquery or javascript, then set the database to respond to json and do authorization/authentication on all of the web requests.