Sunday, November 27, 2011

[Rails] how to import default js file in rails 3.1

in app\views\layouts\application.html.erb
when i write
<%= javascript_include_tag :defaults %> ,
i get
<script src="/assets/defaults.js" type="text/javascript"></script>
at source file.

<%= javascript_include_tag "application" %> gets
<script src="/assets/application.js?body=1"
type="text/javascript"></script>.

<%= javascript_include_tag :defaults %> also didn't work.

how to solve this?

thanks.

ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

rails -v
Rails 3.1.1

--
Posted via http://www.ruby-forum.com/.

--
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate