Save 36% for Black Friday! Learn more

All threads / Need to do cascading select lists in Rails 5

Ask A Question


You’re not receiving notifications from this thread.

Need to do cascading select lists in Rails 5

Simon P asked in Rails


Struggling with this one....

Quite a few articles around but most quite old, really would like to use Stimulus but I cant find any pointers.

Have a locations Select.

One a selection is made I want a AJAX style population of the rooms Select where each location has_many rooms.

Any ideas or guidance please?


I worked it out following:

Just in case anyone comes through here looking for the same.

Will try and redo it in Stimulus when I get chance.

Join the discussion

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

Join 54,329+ 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.