helpers in document on allow #4

Closed
Nemo64 opened this Issue Feb 26, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@Nemo64

Nemo64 commented Feb 26, 2014

The meteor collection methods to allow and deny objects on update and remove give a parameter doc which contains the original object before modification. These do not have the helpers attached. Is that fixable?

@dburles

This comment has been minimized.

Show comment Hide comment
@dburles

dburles Feb 27, 2014

Owner

hey they should do, have you defined your helpers both client and server side?
e.g outside of the client or server directory and not inside an isClient or isServer

Owner

dburles commented Feb 27, 2014

hey they should do, have you defined your helpers both client and server side?
e.g outside of the client or server directory and not inside an isClient or isServer

@dburles

This comment has been minimized.

Show comment Hide comment
@dburles

dburles Mar 4, 2014

Owner

hey @Nemo64 did you manage get the issue sorted out?

Owner

dburles commented Mar 4, 2014

hey @Nemo64 did you manage get the issue sorted out?

@Nemo64

This comment has been minimized.

Show comment Hide comment
@Nemo64

Nemo64 Mar 4, 2014

nope, i haven't had time to do that yet, sorry

Nemo64 commented Mar 4, 2014

nope, i haven't had time to do that yet, sorry

@dburles dburles closed this Apr 2, 2014

@theduke

This comment has been minimized.

Show comment Hide comment
@theduke

theduke Feb 11, 2015

This is still an issue for me with the newest version!

theduke commented Feb 11, 2015

This is still an issue for me with the newest version!

@dburles

This comment has been minimized.

Show comment Hide comment
@dburles

dburles Feb 12, 2015

Owner

Meteor doesn't apply the transform function to the doc you get in that context. However you can pass the doc object into the transform function like so: doc = MyCollection._transform(doc);

Owner

dburles commented Feb 12, 2015

Meteor doesn't apply the transform function to the doc you get in that context. However you can pass the doc object into the transform function like so: doc = MyCollection._transform(doc);

@theduke

This comment has been minimized.

Show comment Hide comment
@theduke

theduke Feb 12, 2015

Good to know, thanks.
Would be good to add this to the Readme.

theduke commented Feb 12, 2015

Good to know, thanks.
Would be good to add this to the Readme.

@theduke

This comment has been minimized.

Show comment Hide comment
@theduke

theduke Feb 12, 2015

Fair warning to others: after doing doc = Collection._transform(doc),
changes to the new doc will not make it to mongo!
I guess a copy of the original object is made.

theduke commented Feb 12, 2015

Fair warning to others: after doing doc = Collection._transform(doc),
changes to the new doc will not make it to mongo!
I guess a copy of the original object is made.

@dburles

This comment has been minimized.

Show comment Hide comment
@dburles

dburles Feb 12, 2015

Owner

Good point. I think there's a good reason that it's not transformed.

Owner

dburles commented Feb 12, 2015

Good point. I think there's a good reason that it's not transformed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment