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 --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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? On 6/27/07, Camo <csinge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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 > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
just to make sure, you put the codepress/ directory in public/javascripts/ correct? that would make the full src path "/javascripts/codepress/codepress.js" On 6/28/07, Camo <csinge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> just to make sure, you put the codepress/ directory in > public/javascripts/ correct? that would make the full src path > "/javascripts/codepress/codepress.js" > > On 6/28/07, Camo <csi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---