Forum: Ruby on Rails Javascript include issue

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
41809768bb32f3217337361125c2a388?d=identicon&s=25 Camo (Guest)
on 2007-06-28 05:33
(Received via mailing list)
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
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (au5lander)
on 2007-06-28 05:48
(Received via mailing list)
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?
41809768bb32f3217337361125c2a388?d=identicon&s=25 Camo (Guest)
on 2007-06-28 09:02
(Received via mailing list)
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.
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (au5lander)
on 2007-06-28 15:45
(Received via mailing list)
just to make sure, you put the codepress/ directory in
public/javascripts/ correct?  that would make the full src path
"/javascripts/codepress/codepress.js"
41809768bb32f3217337361125c2a388?d=identicon&s=25 Camo (Guest)
on 2007-06-29 07:56
(Received via mailing list)
yes that is correct, its only when there is the assest timestamp that
i get an issue

On Jun 28, 11:44 pm, "Chris Hall" <christopher.k.h...@gmail.com>
This topic is locked and can not be replied to.