I am using rails-backbone, coffeescript gems in my rails 3.2.6 project.
square = (x) -> x * x
alert square(5)
this is the blog.js.coffee script file it produces:
(function() { var square; square = function(x) {return x * x;}; alert(square(5));
I need to call the square()
method in an other view file.
How can I call that? Is there any thing wrong I am doing?