Ask A Question

Notifications

You’re not receiving notifications from this thread.

Need to do cascading select lists in Rails 5

Simon P asked in Rails

Hi

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?

Simon

Reply

I worked it out following:

https://kernelgarden.wordpress.com/2014/02/26/dynamic-select-boxes-in-rails-4/

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

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

Reply
Join the discussion
Create an account Log in

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

Join 81,149+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.