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

.find() shortcut #345

Merged
merged 1 commit into from Jun 19, 2013

Conversation

Projects
None yet
4 participants
@michaelmior
Contributor

michaelmior commented May 16, 2013

Thoughts on adding a .find(attrs, options) shortcut which would be equivalent to .findOrCreate(attrs, _.defaults({create: false}, options))?

@philfreo

This comment has been minimized.

Show comment
Hide comment
@philfreo

philfreo May 13, 2013

Collaborator

+1

Collaborator

philfreo commented May 13, 2013

+1

@PaulUithol

This comment has been minimized.

Show comment
Hide comment
@PaulUithol

PaulUithol May 16, 2013

Owner

Yeah, that sounds pretty good actually. I do hope not too many people will mix it up with instance.find, which proxies to underscore's find.

Owner

PaulUithol commented May 16, 2013

Yeah, that sounds pretty good actually. I do hope not too many people will mix it up with instance.find, which proxies to underscore's find.

PaulUithol added a commit that referenced this pull request Jun 19, 2013

@PaulUithol PaulUithol merged commit 8d2b3f0 into PaulUithol:master Jun 19, 2013

@michaelmior michaelmior deleted the michaelmior:model-find branch Jun 19, 2013

@michaelmior

This comment has been minimized.

Show comment
Hide comment
@michaelmior

michaelmior Jun 19, 2013

Contributor

Thanks for the merge :)

Contributor

michaelmior commented Jun 19, 2013

Thanks for the merge :)

@wulftone

This comment has been minimized.

Show comment
Hide comment
@wulftone

wulftone Jul 25, 2013

This is awesome, but I think it's a little backwards... find depending on findOrCreate? Shouldn't it be the other way around? : )

wulftone commented Jul 25, 2013

This is awesome, but I think it's a little backwards... find depending on findOrCreate? Shouldn't it be the other way around? : )

@michaelmior

This comment has been minimized.

Show comment
Hide comment
@michaelmior

michaelmior Jul 25, 2013

Contributor

@wulftone You're probably right. I was simply didn't touch findOrCreate to avoid potentially breaking existing code. There's no duplication in the implementation of each though, so I don't think it's a big concern.

Contributor

michaelmior commented Jul 25, 2013

@wulftone You're probably right. I was simply didn't touch findOrCreate to avoid potentially breaking existing code. There's no duplication in the implementation of each though, so I don't think it's a big concern.

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