Answer the question
In order to leave comments, you need to log in
How to bind form values from a dropdown menu to a condition in a method in Ruby on Rails?
Good afternoon.
I want to create a drop-down list in the form that is not related to the database and that, depending on the selected value, the desired method in the model works.
Tell me or direct pliz in which direction to dig.
I can't figure it out myself.
Answer the question
In order to leave comments, you need to log in
You need to either make several actions in the controller and make a request to the desired one using javascript, or make private methods in the controller and call them in the desired action, not through case. The first option is more correct.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question