いくつかの画像をレンダリングしようとするビューがあります。イメージのパスはすべて、データベースから動的に取得されます。問題は、私がトレースしているときに image_tab が「assets/imagepath」をレンダリングするときと、「images/imagepath」をレンダリングするときがあることです。
<div class="col-sm-9 guess-button">
<div class="row" id="cards">
<div class="col-xs-2 col-sm-offset-1 .col-xs-offset-1">
<% if @attempts && @attempts > 0 %>
<%= image_tag @deal.at(0), class: "img-responsive"%>
<% else %>
<%= image_tag "cardBack.gif", class: "img-responsive"%>
<% end %>
</div>
<div class="col-xs-2">
<% if @attempts && @attempts > 1 %>
<%= image_tag @deal.at(1), class: "img-responsive"%>
<% else %>
<%= image_tag "cardBack.gif", class: "img-responsive"%>
<% end %>
</div>
<div class="col-xs-2">
<% if @attempts && @attempts > 2 %>
<%= image_tag @deal.at(2), class: "img-responsive" %>
<% else %>
<%= image_tag "cardBack.gif", class: "img-responsive"%>
<% end %>
</div>
<div class="col-xs-2">
<% if @attempts && @attempts > 3 %>
<%= image_tag @deal.at(3), class: "img-responsive" %>
<% else %>
<%= image_tag "cardBack.gif", class: "img-responsive"%>
<% end %>
</div>
<div class="col-xs-2">
<% if @attempts && @attempts > 4 %>
<%= image_tag @deal.at(4), class: "img-responsive"%>
<% else %>
<%= image_tag "cardBack.gif", class: "img-responsive"%>
<% end %>
</div>
</div> <!-- ROW -->
</div>