On Fri, Jan 13, 2012 at 2:43 PM, djangst <[email protected]> wrote:
> I find it confusing, because the language in application.js indicates
> that separate javascript files need only be included in that directory
> and they'll automatically be compiled, while other sources say files
> must be specifically required.
>
> In fact application.js says "not advisable to add code directly here,"
> which I read as "don't do your requiring here, pal," implying that it
> isn't necessary.
>
> Guides didn't make it any clearer.
>
>
I guess if .. lets say you have 2 files
tasks.js
activities.js
if you put require_tree inside your application.js it will include that
files using this
<%= javascript_include_tag "application" %>
but if you just only need tasks.js then
<%= javascript_include_tag "tasks" %>
and that's all
Javier
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.