Javascript Ruby on Rails

How to create a dependent dropdown in Ruby on Rails

How to create a dependent dropdown in Ruby on Rails?

In the form as is

and those fields generated HTML is

that’s it in the form, now JS, Ajax & controller

The JS / Ajax is

and in the controller into action

That’s it

Fool Dev

I didn't get trained by the school system like other kids, and when I did concentrate on learning, my mind was cluttered and locked by the programming of the system. © Huey Newton