Forum: Ruby on Rails What to use //= require_tree or js,css incude tag in application.erb ?

Posted by fahim patel (fahim_patel)
on 2012-11-21 11:50
(Received via mailing list)
Hi ,

We are using reqiure_tree in our application.js and application.css.
As per i know  require_tree include all js and css in application.js and
application.css .

 We include application file of both .js and .css in our 
application.erb.

Q .  We include both .js and .css application file in application.erb .
       Is  including in application.erb, did all .js and .css file are
included in application.erb or not ?

      If yes , than why we include each .js and .css one more time in
application.erb ?

Example
Assume that i make myjs.js and mycss.css and put them respectively in 
asset
folder.

##############application.erb######################
               <%= stylesheet_link_tag    "application", :media => "all" 
%>
<%= stylesheet_link_tag "mycss"  %># is i have to include it here or 
above
line  is enough for me because we have use require_tree in 
application.css
and which include all .css in application.css

                <%= javascript_include_tag "application" %>
<%= javascript_include_tag "myjs" %># is i have to include it here or 
above
line  is enough for me because we have use require_tree in 
application.js
and which include all .js in application.js.


I am confused .

Hope you will understood the situation .

Thanks
Fahim Babar Patel
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.