So I could put my code into another file "foo.js" and 'require' it in
application.js.
I believe these other .js files would be in the assets directory to be
picked up?
On 1/12/12 11:57 AM, Linus Pettersson wrote:
As it says in application.js:
"
// This is a manifest file that'll be compiled into including all the
files listed below.
// Add new JavaScript/Coffee code in separate files in this directory
and they'll automatically
// be included in the compiled file accessible from
http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll
appear at the bottom of the
// the compiled file."
I find it good to put the code in different files. It makes it easier to
find the correct code when debugging.
--
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/-/5lOOaMurUM8J.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
--
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@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.