Im trying to declare a coffescript function and call it later in the code. I'm pretty new to this, and can't seem to find anything on it.
Here is the code im working on, as you can see I try to call the square function:
@square = (x) -> x * x
You can do it like so
p coffee: document.write @square(3)
But !!NEVER EVER!! write such horrible things. In ROR Slim templates are for ruby only. And please don't define any methods there.