-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow callOptions to be added when a validated method is created #46
Conversation
// up doing validations twice | ||
// XXX needs option to disable, in cases where the client might have incomplete information to | ||
// make a decision | ||
this.callOptions.throwStubExceptions = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think passed in options should override these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Done.
@stubailo Anything else you'd like to see? |
Looks pretty good, let me get into work and I'll merge and publish! |
Thanks man. On Fri, Apr 15, 2016 at 11:01 AM Sashko Stubailo [email protected]
|
throwStubExceptions: true, | ||
}; | ||
|
||
options.callOptions = _.extend(defaultCallOptions, options.callOptions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I think this will actually overwrite the defaultCallOptions
with options.callOptions
. So we probably want:
_.extend({}, defaultCallOptions, options.callOptions);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, good catch.
@stubailo Ok, I've renamed callOptions to applyOptions throughout, and updated the Readme. Back to you. |
Looks perfect! Thanks. |
FYI, I've signed the meteor contributor agreement.
I want to be able to send in an options object to be used in the
Meteor.apply
call of a validated method. My goal is to use thenoRetry
option, but I made this change to allow any options to be passed in, so that it can be used for any current or future apply options that exist. I added a test, but since the only option I could test was client side, the test doesn't do anything on the server side.