Javascript include issue

Hey guys,

I’ve started working on a codepress plugin, (codepress.org)

however I am having a problem with the javascript include via ruby
code, rails adds ?something to stop caching,

however this ?soemthing is affecting the actual javascript, take it
out and it works

Any help would be great

Cheers Cameron

it’s called asset timestamping and i can’t say that i have ever heard
of this ever causing a problem. rails is just adding the file’s
modification time to the end of the url. it shouldn’t have any effect
on retrieving the file or executing any code within it.

can you be more specific as to what the problem is?

I didn’t think it would affect it either, however it seems to be

Ok this what I have done to replicate the error

went to codepress.org got the latest code,

included it in my layout like the following <%= javascript_include_tag
“codepress/codepress”%>

then in my view i have went <%= f.text_area :content, :class =>
“codepress javascript” %>

No when i do this i get the following error (In Firefox)

self.editor.setCode is not a function
self.editor.setCode(self.textarea.value);

when I hard code the javascript include i get no javascript errors and
it works fine.

just to make sure, you put the codepress/ directory in
public/javascripts/ correct? that would make the full src path
“/javascripts/codepress/codepress.js”

yes that is correct, its only when there is the assest timestamp that
i get an issue

On Jun 28, 11:44 pm, “Chris H.” [email protected]