我不确定如何使用 twitter 引导选项卡显示模型的索引视图。我有以下代码,但它给了我一个缺少模板的错误。谢谢。
应用程序.html.erb
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">Home</a></li>
<li><a href="#profile" data-toggle="tab">Profile</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="home">
<p>Home...</p>
</div>
<div class="tab-pane fade" id="profile">
<%= render :template => 'goals#index' %>
</div>
</div>
更新 1:显示 rake 路由的输出
goals GET /goals(.:format) goals#index
POST /goals(.:format) goals#create
new_goal GET /goals/new(.:format) goals#new
edit_goal GET /goals/:id/edit(.:format) goals#edit
goal GET /goals/:id(.:format) goals#show
PUT /goals/:id(.:format) goals#update
DELETE /goals/:id(.:format) goals#destroy
更新 2:错误输出
缺少带有 {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]} 的模板 /goals#index。搜索:
干杯,阿兹伦