Hi, Using 3.1, I have set up a backbone.js file structure in my app/assets/ javascripts directory. I am unable to ensure that certain files have access to others in the directory, e.g., helper files. How can .js files be ''required'' in other .js files? Thanks, Lille -- 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-/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.
What do you mean by "How can .js files be ''required'' in other .js files? " That''s not really the way JavaScript works. What exactly are you trying to do? -- 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/-/WW6qR-3-uIgJ. 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.
On Mon, Oct 3, 2011 at 07:53, Tim Shaffer <timshaffer-BUHhN+a2lJ4@public.gmane.org> wrote:> What do you mean by "How can .js files be ''required'' in other .js files? " > That''s not really the way JavaScript works.Given that the OP doesn''t seem to know JS all that well, it''s a reasonable question. Inclusion of one kind or another (be it literal inclusion at that spot, or just noting the reference) is a feature of many other languages. I''ve sometimes wished JS had such a thing. :-( -Dave -- LOOKING FOR WORK, preferably Ruby on Rails, in NoVa/DC; see main web site. Main Web Site: davearonson.com Programming Blog: codosaur.us Excellence Blog: dare2xl.com -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Well, I''m working in Rails darlin'' CoffeeScript and I see the special facilities for asset loading new with Rails 3.1, so I wondered whether it might now be possible to modularize .js code. I was encouraged in this hope by seeing that node.js offers ''require'';) Lille On Oct 3, 8:32 am, Dave Aronson <googlegroups2d...-BRiZGj7G2yRXqviUI+FSNg@public.gmane.org> wrote:> On Mon, Oct 3, 2011 at 07:53, Tim Shaffer <timshaf...-BUHhN+a2lJ4@public.gmane.org> wrote: > > What do you mean by "How can .js files be ''required'' in other .js files? " > > That''s not really the way JavaScript works. > > Given that the OP doesn''t seem to know JS all that well, it''s a > reasonable question. Inclusion of one kind or another (be it literal > inclusion at that spot, or just noting the reference) is a feature of > many other languages. I''ve sometimes wished JS had such a thing. :-( > > -Dave > > -- > LOOKING FOR WORK, preferably Ruby on Rails, in NoVa/DC; see main web site. > Main Web Site: davearonson.com > Programming Blog: codosaur.us > Excellence Blog: dare2xl.com-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.