title: Bind allowedValues to values from a collection in simple-schema
body: <p>I'm using <a href="https://github.com/aldeed/meteor-simple-schema" rel="nofollow">aldeed:simple-schema</a> and here's the code:</p>
  
  <pre><code>Cities = new Mongo.Collection('cities');
  
  Cities.insert({
      name: 'Oslo'
  });
  
  Cities.insert({
      name: 'Helsinki'
  });
  
  Contact = new SimpleSchema({
      city: {
          type: String,
          allowedValues: Cities.find().map((e) =&gt; e.name) // written ES6-style for readability; in fact, here goes an ES5 anonymous function definition
      }
  });
  </code></pre>
  
  <p>What it does is explicitly binds currently existing cities from <code>Cities</code> collection to <code>Contact</code> schema's certain field's allowed values, so it's then impossible to store any other value than <code>"Oslo"</code> or <code>"Helsinki"</code>.</p>
  
  <p>But when posting a <a href="https://github.com/aldeed/meteor-autoform" rel="nofollow">quickForm</a>, the field (<code>select</code>, actually) has no options.</p>
  
  <p>If I rewrite the mapping function to</p>
  
  <pre><code>(e) =&gt; {
      console.log(e);
      return e.name;
  }
  </code></pre>
  
  <p>then I get </p>
  
  <pre><code>I20150911-18:07:23.334(4)? { _id: 'GLAbPa6N4W4c9GZZh', name: 'Oslo' }
  I20150911-18:07:23.333(4)? { _id: 'vb64X5mKpMbDNzCkw', name: 'Helsinki' }
  </code></pre>
  
  <p>in server logs, which makes me think the mapping function is correct.</p>
  
  <p>At the very same time, doing all this in Mongo console returns desirable result:</p>
  
  <pre><code>production-d:PRIMARY&gt; db.cities.find().map(function (e) { return e.name; });
  [ "Oslo", "Helsinki" ]
  </code></pre>
  
  <p>What do I do wrong? Is it impossible to fill the simple-schema's <code>allowedValues</code> array at the run time?</p>