我正在將舊的Rails 2.2.2項目遷移到Rails 3,並且我一直在修復一些問題 - 最新版本如下。Rails 2.2.2到Rails 3 - 可分類
undefined method `sortable'
顯然Rails 2.2.2有一個叫做「sortable」的方法或關鍵字?是Rails 2.2.2框架的一部分嗎?
Rails 3中是否存在相同的功能?
我該如何改變這在Rails 3中工作?
感謝
<tr>
<th style="padding-left:20px;"><%= sortable "name", "Name" %></th>
<th><%= sortable "company", "Company" %></th>
<th>Email</th>
<th><%= sortable "created_at", "Created On" %></th>
</tr>
迪馬,謝謝,但你建議的網址是實現對Rails 2.2.2進行排序,並且我的問題是如何獲得我的Rails 2.2.2代碼已經可以排序工作,在Rails 3中工作。請再次閱讀問題 – Slinky 2013-03-24 16:40:15
對不起,那麼你可以使用https://github.com/dadooda/handles_sortable_columns gem進行排序 – 2013-03-24 16:50:23
謝謝。我將看看 – Slinky 2013-03-24 16:54:00