In my Rails project, I have a file /app/assets/javascripts/bootstrap-tab.js which allows me to use tabs in my Rails project, which uses Twitter Bootstrap HTML.
I also have a file /app/views/folder1/show.html.erb that uses the tabs:
<h3>Tabs</h3><br>
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">Tab1</a></li>
<li><a href="#tab2" data-toggle="tab">Tab2</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<div class="well">
Text1
</br>
<%= @myobject.name %>
</div>
</div>
<div class="tab-pane" id="tab2">
<div class="well">
Text2
</div>
</div>
</div>
However I need it to know where the javascript file is. What is the ruby way to do this? Would I still just put something like
<script src="/assets/javascriptss/bootstrap-tab.js"></script>
into the show.html.erb? And if so, what path would I put?
//= require bootstrap-tab.jsin your mainapplication.jsfile)?