Ruby on Rails Friday, July 29, 2011

Hi,


what is the best/preferred/recommended way to expose functions (and classes in coffeescript) 
to the browser.

At the moment i do this

@func = -> "a function def" which translates into
this.func = function(){return "a function def"} 

where this is the browser window.

Actually it works ... however it feels somehow wrong.
I'd rather use the commonJS module system.

Any comments?

Best regards

Robert

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qaFQRhHclWwJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment