How to implement dependent dropdowns in Rails 4 with an unobtrusive jQuery script

Logo devnterface d88f51727b3053dd3115e1ef9c566ad79b4c2edb3cd208c06345fc37058bebd9

I recently had to implement a view with the classic search form with two select dependent on each other. My aim was to leave the page as clean as possible and make the code that loads the options for the daughter dropdown reusable.Suppose, therefore, to have two models, SpecializationType and Specialization, defined as follows:1234567891011121314151617181920212223242526272829303132class Specializa...

Read more