Skip to content
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

Passing options to model initializers #2

Open
ejosafat opened this issue Jul 14, 2012 · 2 comments
Open

Passing options to model initializers #2

ejosafat opened this issue Jul 14, 2012 · 2 comments

Comments

@ejosafat
Copy link

You can't pass options to Backbone.Model initializer, can you?

@unamashana
Copy link
Member

Sorry. I don't understand. What do you mean? Can you give an example?

@ejosafat
Copy link
Author

something like:

var userWithEmail = BackboneFactory.create('user', { email: '[email protected]' }, { collection : users }})

I've implemented it in my fork of your project. Your idea of FactoryGirl for javascript is quite useful! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants