rubyforgood / homeward-tails

Homeward Tails is an application making it easy to link adopters/fosters with pets. We work with grassroots pet rescue organizations to understand how we can make the most impact.
MIT License
70 stars 117 forks source link

Implement Country/State select ability (higher priority) #1170

Open kasugaijin opened 4 days ago

kasugaijin commented 4 days ago

We currently use city-state gem to get a list of states for a given selected country. However, this gem is not reliable in production and this thread does not inspire confidence in the long run. So, we will keep things simple and roll our own. This is currently affecting the production app, so would be great to resolve sooner than later!

This is a two-part issue

Part 1)

Part 2)

Tip: To get a full list of the states for each country, use the city-state gem in your rails console to get the values i.e., CS.states(:US) will give you the states for USA. Then you can use these in Stimulus.

sarvaiyanidhi commented 3 days ago

@kasugaijin I can take up this issue.. Can you please assign it to me?

kasugaijin commented 3 days ago

@sarvaiyanidhi all yours!

mononoken commented 1 day ago

FYI, @sarvaiyanidhi:

Just merged #1169 which added some city-state usage in the fosterer edit form and fosterer invite form. It also touched the country_state_controller.js a little. Hopefully, it's not too much work for you. Thank you!

sarvaiyanidhi commented 12 hours ago

Thanks for the heads up @mononoken .. Will check this form as well while implementing the changes.