TokiTranslate/app/views/dictionary/index.html.erb
maddiebaka f5e9f3699f Add dictionary ingest and view
Dictionary json ingest to database, view populated with database contents
2023-10-12 22:24:35 -04:00

36 lines
770 B
Plaintext

<h1>Dictionary#index</h1>
<p>Find me in app/views/dictionary/index.html.erb</p>
<p><%= @parts_of_speech.count %> parts of speech entries in database</p>
<h1>Parts of Speech</h1>
<table>
<tr>
<td><b>Part of Speech</b></td>
<td><b>Definition</b></td>
</tr>
<% @parts_of_speech.each do |item| %>
<tr>
<td><b><%= item.pos %></b></td>
<td><%= item.definition %></td>
</tr>
<% end %>
</table>
<h1>Words</h1>
<% @words.each do |word| %>
<h2><%= word.word %></h2>
<table>
<tr>
<td><b>Part of Speech</b></td>
<td><b>Definition</b></td>
</tr>
<% word.definitions.each do |definition| %>
<tr>
<td><b><%= definition.pos %></b></td>
<td><%= definition.definition %></td>
</tr>
<% end %>
</table>
<% end %>