Creating a Country Dropdown with Flags in Ruby on Rails 7, slim-select.js, countries gems
Blog post: https://erimicel.com/creating-a-country-dropdown-with-flags-in-ruby-on-rails-7-67df1806e433
Table of Contents
- Ruby 3.2.2
- Ruby on Rails 7.0.5
- TailwindCss
- Esbuild
- Stimulus
- Slim Select 2.0
- countries gem
- country_select gem
Clone the repo:
git clone https://github.com/erimicel/country_app.git
cd country_app
Install bundles:
bundle install
Create and migrate database:
rails db:create
rails db:migrate
Start the rails server and js/css builds
./bin/dev
Check it out in a browser:
Visit http://localhost:3000 in your favorite browser.