0

I am using 0.7.0.1 Meteor and am trying to update from Collection to SmartCollection. See below... the first one works and the second one doesnt (but does when I switch back from SmartCollection to Collection). The _id works in both cases but not name. I read somewhere that name might be a reserved word or something, but why would it work in the other first example below? Any ideas? What could it be in SmartCollection that is breaking this?

working

{{#each operatingSystemBrands}}
        <input type="radio" class="brandRadios" name="brandRadios" id="{{_id}}" value="{{_id}}">
        <label for="{{_id}}">{{name}}</label>
{{/each}} 

not working:

{{#each devices}}
        <input type="radio" class="deviceRadios" name="deviceRadios" id="{{_id}}" value="{{_id}}">
        <label for="{{_id}}">{{name}}</label>
{{/each}} 
timmyg13
  • 503
  • 1
  • 5
  • 15

2 Answers2

0

I think this is a bug, try using {{this.name}}, instead. Not sure if it'll help but its just a hunch. The context might be getting messed up.

I know iron-router is doing this. Did you also upgrade it?

Tarang
  • 75,157
  • 39
  • 215
  • 276
  • Using "this." didnt work. My iron-router is 0.6.2 which is up to date. Are you saying maybe try to downgrade it? – timmyg13 Jan 11 '14 at 19:14
  • It's crazy... i changed the field "name" to "bob" in case it was a reserved field or something, but it still doesnt work. – timmyg13 Jan 11 '14 at 22:11
0

NM, was a separate issue. Was an issue when I was converting js to coffeescript, not sure why it broke only when going to smartcollections.

timmyg13
  • 503
  • 1
  • 5
  • 15