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

Potential fix for #3051. Add isModel method to collections. #3052

Merged
merged 2 commits into from Mar 24, 2014

Conversation

Projects
None yet
6 participants
@HenrikJoreteg
Copy link
Contributor

HenrikJoreteg commented Mar 7, 2014

One possible solution that seems really simple and configurable to me.

@asakusuma

This comment has been minimized.

Copy link

asakusuma commented Mar 21, 2014

+1. This would be very useful.

@derekbrown

This comment has been minimized.

Copy link

derekbrown commented Mar 21, 2014

This would be absolutely HUGE for the application that my team and I are building.

@wookiehangover

This comment has been minimized.

Copy link
Collaborator

wookiehangover commented Mar 22, 2014

+1 I have a few apps that would benefit from this

@jashkenas

This comment has been minimized.

Copy link
Owner

jashkenas commented Mar 24, 2014

Alright — let's do it. Henrik ... mind renaming the internal method to _isModel, and rebasing for a clean merge?

@HenrikJoreteg

This comment has been minimized.

Copy link
Contributor

HenrikJoreteg commented Mar 24, 2014

Will do

On Mon, Mar 24, 2014 at 7:44 AM, Jeremy Ashkenas notifications@github.com
wrote:

Alright — let's do it. Henrik ... mind renaming the internal method to _isModel, and rebasing for a clean merge?

Reply to this email directly or view it on GitHub:
#3052 (comment)

backbone.js Outdated
// Method for checking whether an object should be considered a model for
// the purposes of adding to the collection.
isModel: function (model) {
return model instanceof Model

This comment has been minimized.

@caseywebdev

caseywebdev Mar 24, 2014

Collaborator

Might want to throw a ; at the end here to match the project's style.

@HenrikJoreteg

This comment has been minimized.

Copy link
Contributor

HenrikJoreteg commented Mar 24, 2014

How's that? I think it's good to go.

jashkenas added a commit that referenced this pull request Mar 24, 2014

Merge pull request #3052 from HenrikJoreteg/master
Potential fix for #3051. Add isModel method to collections.

@jashkenas jashkenas merged commit 3caba2a into jashkenas:master Mar 24, 2014

@jashkenas jashkenas added the fixed label Mar 24, 2014

@caseywebdev

This comment has been minimized.

Copy link
Collaborator

caseywebdev commented Mar 24, 2014

Coolio, nice addition.

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