Я пытаюсь следовать руководству по рельсовым кастам по столбцам сортируемой таблицы. , и я получаю сообщение об ошибке.
SQLite3::SQLException: нет такого столбца: имя: ВЫБЕРИТЕ «проекты».* ИЗ «проектов» ORDER BY name asc
Я следовал инструкциям в учебнике, единственное, что изменилось, это размер таблицы, имя и имена столбцов.
Вот мой вид поиска:
<table class = "pretty">
<tr>
<th><%= sortable "project_name", "Project name" %> </th>
<th><%= sortable "client", "Client" %></th>
<th>Exception pm</th>
<th>Project owner</th>
<th>Tech</th>
<th>Role</th>
<th>Industry</th>
<th>Financials</th>
<th>Business div</th>
<th>Status</th>
<th>Start date</th>
<th>End date</th>
<th>Entry date</th>
<th>Edited date</th>
<th>Summary</th>
<th>Lessons learned</th>
<th>Customer benifits</th>
<th>Keywords</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @projects.each do |t| %>
<tr>
<td><%= t.project_name %></td>
<td><%= t.client %></td>
<td><%= t.exception_pm %></td>
<td><%= t.project_owner %></td>
<td><%= t.tech %></td>
<td><%= t.role %></td>
<td><%= t.industry %></td>
<td><%= t.financials %></td>
<td><%= t.business_div %></td>
<td><%= t.status %></td>
<td><%= t.start_date %></td>
<td><%= t.end_date %></td>
<td><%= t.entry_date %></td>
<td><%= t.edited_date %></td>
<td><%= t.summary %></td>
<td><%= t.lessons_learned %></td>
<td><%= t.customer_benifits %></td>
<td><%= t.keywords %></td>
<td><%= link_to 'Show', project %></td>
<td><%= link_to 'Edit', edit_project_path(project) %></td>
<td><%= link_to 'Destroy', project, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
РЕДАКТИРОВАТЬ:
Это моя схема БД
ActiveRecord::Schema.define(:version => 20120717141952) do
create_table "projects", :force => true do |t|
t.string "project_name"
t.string "client"
t.string "exception_pm"
t.string "project_owner"
t.string "tech"
t.string "role"
t.string "industry"
t.string "financials"
t.string "business_div"
t.string "status"
t.date "start_date"
t.date "end_date"
t.datetime "entry_date"
t.datetime "edited_date"
t.text "summary"
t.text "lessons_learned"
t.text "customer_benifits"
t.text "keywords"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
end
Любые идеи? Любая помощь вообще будет оценена. Я новичок в рубине на рельсах, так что полегче :)