Skip to content

Instantly share code, notes, and snippets.

@tomdale tomdale/gist:2481356

Created Apr 24, 2012
What would you like to do?
One CoffeeScript ambiguity
App.messageController = Ember.Object.create
message: "Hello, world!"
# Compiles to:
# App.messageController = Ember.Object.create({
# message: "Hello, world!"
# });
# Okay, let's refactor it and delete the message property:
App.messageController = Ember.Object.create
# Compiles to:
# App.messageController = Ember.Object.create
# Oops, your controller is now the Ember.Object#create function!

This comment has been minimized.

Copy link

alexgorbatchev commented Apr 17, 2014

same as

return {
  foo: 123


  foo: 123


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.