How can I use option --bare in Rails 3.1 for CoffeeScript?

Someone know how can I use this option in Rails 3.1?
Now CoffeScript puts a function “.call(this)” on each file, but I want
to remove this.

+1 This seems to affect functions too, since Coffeescript makes
functions
into vairables, and those variables aren’t available outside of that
scope.

If you want to run it both on node and client you can do something like
this
(taken from
javascript - How do I define global variables in CoffeeScript? - Stack Overflow):

root = exports ? @

root.alertMe =(msg) →
alert msg

alertMe ‘hi there’

The following should actually work too for client side only (not battle
tested here though)

@.alertMe =(msg) →
alert msg

It is a matter of personal style I guess

you can use

class window.MyClassName or
window.functionName =

Check out this here: http://coffeescript-seattlejs.heroku.com/

No need to go bare.

On Fri, May 27, 2011 at 3:54 AM, Kieran P [email protected] wrote:

http://groups.google.com/group/rubyonrails-talk?hl=en.