I'm building a dropdown menu for a form, that looks something like this:
The selected option has to be in the params later on.
I'm a React dev and know how to build the dropdown menu itself, but how do I wire JS and Rails in this case?
Do I need an AJAX controller, only for the menu? How do I use it in JS?
I just had honey in my head.
All you have to do is render a hidden field that you update on click and just render all ul's and li's and toggle their display with jQuery.
Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.