Static classes and methods in coffeescript

You can define class methods by prefixing them with @: class Box2DUtility constructor: () -> @drawWorld: (world, context) -> alert ‘World drawn!’ # And then draw your world… Box2DUtility.drawWorld() Demo: http://jsfiddle.net/ambiguous/5yPh7/ And if you want your drawWorld to act like a constructor then you can say new @ like this: class Box2DUtility constructor: (s) -> … Read more

Is there any way to not return something using CoffeeScript?

You have to explicitly return nothing, or to leave an expression evaluating to undefined at the bottom of your function: fun = -> doSomething() return Or: fun = -> doSomething() undefined This is what the doc recommends, when using comprehensions: Be careful that you’re not accidentally returning the results of the comprehension in these cases, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)