Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Update app/lib/view_helper.coffee #43

Merged
merged 2 commits into from Oct 11, 2012

Conversation

Projects
None yet
2 participants
Contributor

andriijas commented Oct 10, 2012

You are never intressted in the actual user object in template context, just it attributes. 

Took the change from ost.io and added in ? after mediator.user so that it works with mediator.user = null as well.

@andriijas andriijas Update app/lib/view_helper.coffee
You are never intressted in the actual user object in template context, just it attributes. 

Took the change from ost.io and added in ? after mediator.user so that it works with mediator.user = null as well.
f5b0e5e
Owner

paulmillr commented Oct 10, 2012

Perhaps, it should be mediator.user.serialize() instead?

Contributor

andriijas commented Oct 11, 2012

Perhaps! I dont know, Im new to chaplin, just took what ost.io was using and modified it :) When I started out with backbone half year ago I used to do .toJSON()

Owner

paulmillr commented Oct 11, 2012

Think about serialize() as an a lot faster toJSON that uses prototypes for less memory usage.

Contributor

andriijas commented Oct 11, 2012

I think then we should use it!

@paulmillr paulmillr added a commit that referenced this pull request Oct 11, 2012

@paulmillr paulmillr Merge pull request #43 from andriijas/patch-2
Update app/lib/view_helper.coffee
5a38751

@paulmillr paulmillr merged commit 5a38751 into paulmillr:master Oct 11, 2012

Owner

paulmillr commented Oct 11, 2012

thanks!

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