我正在尝试在我的应用程序中以模式访问我的一个编辑视图。我的 Show.html 读数如下所示
<%- model_class = Reading -%>
<div class="page-header">
<h1><%=t '.title', :default => model_class.model_name.human %></h1>
</div>
<dl class="dl-horizontal">
<dt><strong><%= model_class.human_attribute_name(:customer_id) %>:</strong></dt>
<dd><%= @reading.customer_id %></dd>
<dt><strong><%= model_class.human_attribute_name(:date_of_reading) %>:</strong></dt>
<dd><%= @reading.date_of_reading %></dd>
<dt><strong><%= model_class.human_attribute_name(:reading1) %>:</strong></dt>
<dd><%= @reading.reading1 %></dd>
<dt><strong><%= model_class.human_attribute_name(:reading2) %>:</strong></dt>
<dd><%= @reading.reading2 %></dd>
<dt><strong><%= model_class.human_attribute_name(:reading3) %>:</strong></dt>
<dd><%= @reading.reading3 %></dd>
</dl>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
customer_readings_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
edit_customer_reading_path(@reading.customer, @reading), :class => 'btn', :data => {:toggle => "modal", :target => "#editItemModal"} %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
customer_reading_path(@reading.customer),
:method => 'delete',
:data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
:class => 'btn btn-danger' %>
</div>
在我的编辑视图中,阅读/编辑
<div id= "editItemModal" class="modal hide fade" tabindex="-1" role="dialog">
<button type="button" class="close" data-dismiss="modal">x</button></h1>
<div class = "page-header">
<h1> Editing Readings </h1>
</div>
<%= render 'form_reading'%>
</div>
但是,在我的节目中单击编辑时,编辑视图不会显示为模式,它只是显示一个空白页面。我能错过什么?