Naina Sakruti said almost 4 years ago on Dynamic Select Fields :
I am getting an error with my country_state_path after the url helpers. It says its a NoMethodError?

David Kimura PRO said almost 4 years ago on Dynamic Select Fields :
In the example, it is `country_states_path` instead of `country_state_path`, could that be the issue?

Naina Sakruti said almost 4 years ago on Dynamic Select Fields :
I don't think so. I have attached what the path should look like for my code verses the underlined error that it is picking up now. Here are the screenshots: 1. https://drive.google.com/open?id=1uo7udt9sUaoJY5UQmOjqcyzR0SGx6Uec 2. https://drive.google.com/open?id=16FX9Zy-UcBvVwc8UWm3ZuxWKBilEPdgL Please let me know if you can tell me why this error is happening.

David Kimura PRO said almost 4 years ago on Dynamic Select Fields :
If could be something weird like spring running. try `bin/spring stop`

Naina Sakruti said almost 4 years ago on Dynamic Select Fields :
Tried that and it doesn't work either. There's still a weird underline under the path. The code is working functionally but when I select a manufacturer (country), I see that the series (state) dropdown gets populated with values when I inspect it but I don't see the names of the series appear on the dropdown. This might be a path error or a view error and I'm unsure of which one.

Naina Sakruti said almost 4 years ago on Dynamic Select Fields :
Actually, I got it to work! Is there any advice you have on now making the state dropdown limit one more dropdown? Such as city.

arinthros said almost 4 years ago on Dynamic Select Fields :
Excellent solution! It works great with has_many :through and complex nested associations.

adam said over 2 years ago on Dynamic Select Fields :
I love this implementation! One question though, what would my target_select.trigger be if using select2?

David Kimura PRO said over 2 years ago on Dynamic Select Fields :
I would probably start with their event docs. I would probably also use a stimulus controller to wrap select2 and do the logic within there. Sounds like a good follow up episode. https://select2.org/programmatic-control/events


Login to Comment