Rails 3 を使用しています。 を使用しeach_with_index
てシーケンスを生成しています。
<% @shops.each_with_index do |shop, i| %>
<div class="item map-marker" id="shop_<%= i+1 %>">
を使ってみdiv_for
ましたが、代わりに がかかりますshop.id
。これを行うより良い方法はありますか?
ありがとう。
Rails 3 を使用しています。 を使用しeach_with_index
てシーケンスを生成しています。
<% @shops.each_with_index do |shop, i| %>
<div class="item map-marker" id="shop_<%= i+1 %>">
を使ってみdiv_for
ましたが、代わりに がかかりますshop.id
。これを行うより良い方法はありますか?
ありがとう。