On Jun 20, 2011, at 4:31 AM, Jonathan Borg wrote:

Hi, I was wondering if there is a way to make helper methods available
in my .coffe files, Im trying to generate a graph from some userdata
with a javascript library, and with the new asset pipeline I can
append .erb so its users.js.coffe.erb which works just great, but I
need some way to get the current_user helper method.. help ?


I am not sure this is such a good idea. Your js, ideally, will be concatenated and compressed and cached. Anything variable ought to be in the HTML, since that changes more frequently, and your js should simply look for the variable within the page and act upon it in the DOM.

Walter

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to