robertj
2011-Jul-29 14:06 UTC
rails 3.1 asset pipeline exposing defined functions and (classes and coffeescript)
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.