These are chat archives for reactioncommerce/reaction

18th
Jul 2015
Aaron Judd
@aaronjudd
Jul 18 2015 02:34
@Aesop7 I ran this in the console and I get "update failed: Access denied. No allow validators set on restricted collection for method 'update’.”
Aaron Judd
@aaronjudd
Jul 18 2015 02:41
Perhaps this is a security issue rather than a schema issue?
Aaron Judd
@aaronjudd
Jul 18 2015 03:15
@Aesop7 this works for me:
  #common:

  ReactionCore.Schemas.userPrefs = new SimpleSchema([
    ReactionCore.Schemas.Accounts
    {
      defaultGame:
        type: String
        label: 'Default Game'
        optional: true
    }
  ])

  ReactionCore.Collections.Accounts.attachSchema ReactionCore.Schemas.userPrefs


  Meteor.methods
    updateAccount: (userId, game) ->
      check userId, String
      check game, String
      console.log userId, game
      ReactionCore.Collections.Accounts.update
        "_id": userId
      ,
        $set:
          "defaultGame": game


  #client:

  var userId = Meteor.userId();
  Meteor.call("updateAccount", userId, "tron")
Spencer Norman
@spencern
Jul 18 2015 03:52
Are we using any meteor pagination packages currently or are we planning to build that from scratch?
or haven’t gotten there yet
Aaron Judd
@aaronjudd
Jul 18 2015 03:55
haven’t gotten there, but it’s one the short list #303, I’ve been leaning towards build from scratch, but I’ll review the packages out there again before we decide.
Spencer Norman
@spencern
Jul 18 2015 03:59
Sounds good. I’m not picky either way about pagination, but I think part of the issue with the inventory variants is due to overwhelming number of dom-elements being created and rendered and pagination of those inventory barcodes will be helpful