arvindvyas / Country-State-Select

It will fetch the countries and according to that fetch the state of that countries, currently it is for countries listing
MIT License
69 stars 78 forks source link

undefined method 'countries_collection' for CountryStateSelect:Module #34

Closed enwood closed 8 years ago

enwood commented 8 years ago

I'm not sure what I'm missing here, but I've added the gem to my Rails 4.2.4 Gemfile, done a bundle install, and a restart of my web server.

In trying this: <%= form_for package do |f| %> <%= f.select :delivery_country, collection: CountryStateSelect.countries_collection %>

I seem only to get undefined method 'countries_collection' for CountryStateSelect:Module

Any ideas?

enwood commented 8 years ago

Whoops! Sorry. Due to my late-night mucking around, it seems Bundler had chosen to pull in version 2 of the gem, instead of the current 3.0.1. We're good now, after adding the version number to the gem specification:

gem 'country_state_select', '3.0.1'