All threads / How do I save data from javascript form to rails model

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I save data from javascript form to rails model

Ryan Bent asked in Rails

I have a mortgage caluculator written in jquery in my rails app. I would like for the user to enter their information and be able to save the calculations to their profile. Store in a column "mortagage calcuation" in user table for example.

I know I need to make an ajax call on the javascript data to push to my rails app. But not sure how to accomplish.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,399+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.