Hi, all,
Happy new year :)
Referring to http://guides.rubyonrails.org/asset_pipeline.html, it
seems that 'require_tree .' in myapp/app/assets/javascripts/
application.js will include all *.js files in the myapp/app/assets/
javascripts/.
I have a few other *.js files in this directory : parts.js, makes.js
and categories.js.
Here's an extract from the html file I am viewing:
--------------- Extract start -----------------------
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
<script src="/javascripts/jquery.js" type="text/javascript"></
script>
<script src="/javascripts/application.js" type="text/javascript"></
script>
<script src="/javascripts/jquery.min.js" type="text/javascript"></
script>
<script src="/javascripts/jquery_ujs.js" type="text/javascript"></
script>
<!--, "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/
jquery.min.js" %>
- "jquery.js", "application.js", "jquery.min.js" , "jquery_ujs.js" -->
<!-- :defaults, "jquery.min.js" -->
<meta content="authenticity_token" name="csrf-param" />
<meta content="jfiFh0CGHgl5F6mX/dORtk1y6IMfnbCavwgx4bVYXbA="
name="csrf-token" />
</head>
<body>
--------------- Extract end -----------------------
My 'app/assets/javascripts/application.js' file is:
--------------- Extract start -----------------------
//= require jquery
//= require jquery_ujs
//= require_tree .
--------------- Extract end -----------------------
My question: I am using rails 3.1.0 and when I open up a page in the
webbrowser and view source, I am not seeing the 3 js files above
being included. Why are the 3 files not included? Is require_tree
broken?
Thank you :)
Gordon
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment