As part of The Democratic Travelers I’m working on the ability to show which states Laura and I have been to. We’re currently tracking that information in the database, but the only place it shows up on the front-end is in a simple numerical count, such as “we’ve been to 39 states…”
We get asked a lot which states we’ve been to and which one’s we have left to tackle, so I thought it’d be great to show a mini map to answer those questions quickly. I stumbled across Stately, a great little symbol font that allows you to create a customizable, scalable map of the United States with minimal mark up.
Normally when I find something like this, I look for a gemified version for use in the Ruby on Rails asset pipeline, but alas, none existed for Stately. I took it as a good opportunity to put together my first ever Ruby gem: stately-rails.
The gem is available on RubyGems.org which means you can add it to your project in the usual manner:
# Gemfile gem 'stately-rails'
From there, you just need to add the stylesheet to your manifest:
// app/assets/stylesheets/application.css *= require stately
The rest of the set up instructions (along with the source code) are available on GitHub, so if you find something wrong or see room for improvement, please feel free create a pull request.