私はRails で単純な* e コマース*サイトに取り組んでおり、クリックされたときにアイテムをバスケットに入れる方法を理解するのに少し苦労しています。アイテムを移動したい場所のテーブルがあります。私はRails 4を使用していますが、Railsは初めてです。
表示項目のリストについて:
<% @items.each do |item| %>
<div data-role="content" >
<ul data-role="listview" data-inset="true">
<a href="#bar"data-rel="dialog"></a>
<li data-icon="plus"><a href="#">
<img src=<%= item.item_media.url %> />
<h3><%= item.brand %> </h3>
<p><%= item.short_description %> </p></a>
<a href="#">Example</a> <!--This is the button that is suppose to save the item.-->
</li>
</ul>