Comments (4)
You have to use Carmen.exclude_countries and use something like (Carmen.country_codes - [list of countries you want])
to set it.
from carmen.
Were you able to do this. I am trying to put this statement in the initializers to limit the countries show only to US and CA, but it gives me error:
Carmen.exclude_countries = (Carmen.country_codes - %w(US CA))
undefined method `country_codes' for Carmen:Module (NoMethodError)
Can you please help me in doing this...
from carmen.
I think this only works for Carmen 0.2.x. I'm not sure if and how that's possible with the new 1.0. But according to the README you should be able to use the old API by adding an additional require. I haven't checked which file you have to require though.
from carmen.
I was originally planning on writing an API compatibility layer, but I haven't had time and I've decided that it's better to get 1.0 out the door than have that hold up the entire library (which contains many other improvements).
If you can use 1.x (and carmen-rails 1.0.0.beta3), you can use the example in the README there to achieve something similar to what you want.
You'll need to add this to your Gemfile:
gem 'carmen-rails', '~> 1.0.0.beta3'
You can then remove any other reference to carmen from your Gemfile.
from carmen.
Related Issues (20)
- 1.0.3 Release Status HOT 6
- Kenya's provinces were replaced by a system of counties in 2013. HOT 2
- France's 27 regions were reduced to 18 in 2016 HOT 2
- New Maintenance Plan HOT 2
- About the country code of Kosovo HOT 1
- Wrong subregions for NZ
- Brazilian's subregions aren't right HOT 2
- UK Counties & Cites Mixed Up HOT 6
- Very slow rake, rspec, and server startup HOT 3
- subregions? method throwing error. HOT 1
- Bahamas -> New Providence (BS-NP) island state missing HOT 2
- Hong Kong has no subregions
- Missing subregion for Chile
- The keys for IT provinces are shown in numeric
- Translation of subregions for CN
- Error on require: uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState (NameError) HOT 1
- Shipping Drop Down Menu - Yerushalayim Al Quads - Change to Jerusalemin
- Locales reset unexpectedly HOT 1
- Search through countries is not so effective, as it may be
- Update repo to show v1.1.3 release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carmen.