Fahim Patel
2012-Nov-21 10:48 UTC
What to use //= require_tree or js,css incude tag in application.erb ?
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 -- 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 To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qlFHEVOolpgJ. For more options, visit https://groups.google.com/groups/opt_out.