All threads / How to Submit Complex Form Data in Ruby on Rails Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to Submit Complex Form Data in Ruby on Rails Discussion

Hi Chris,
Yet another good tutorial you made. I must say I always use option 1.
I don't like moving logic to JS if not needed because more dependencies and more code

Reply
Reply

I don't know how to express it but I'm not comfortable with the second approach. Way more code, clutter and moving parts.

Also, quick and possibly noob question: wouldn't the user be able to change the hidden_field value (by using the inspector) and put whatever value he wants for each of them, without respecting the range?

Reply

Hey Chris, thank you for this! Quick question on method 1: Is there a simple way to throw an error in the model so that the .save fails back in the controller? I have a rather complex algorithm that a user sent string must pass and I need to notify them if it fails.

Reply
Join the discussion

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

Join 53,406+ 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

    © 2021 GoRails, LLC. All rights reserved.