プロジェクト

全般

プロフィール

« | » 

リビジョン 8f01c1db

高徹 高橋 徹 さんが約6年前に追加

[phase-1]index view

差分を表示:

app/controllers/glossary_terms_controller.rb
class GlossaryTermsController < ApplicationController
def index
@glossary_terms = GlossaryTerm.all
end
end
app/views/glossary_terms/index.html.erb
<h2>GlossaryTermsController#index</h2>
<table>
<thead>
<tr>
<td>name</td>
<td>description</td>
</tr>
</thead>
<tbody>
<% @glossary_terms.each do |term| %>
<tr>
<td>
<%= term.name %>
</td>
<td>
<%= term.description %>
</td>
</tr>
<% end %>
</tbody>
</table>

他の形式にエクスポート: Unified diff