Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/views/fm_archives/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<tr class="bg-gray-100">
<th class="border border-gray-200 px-3 py-2 text-left">FM ID</th>
<th class="border border-gray-200 px-3 py-2 text-left">Name</th>
<th class="border border-gray-200 px-3 py-2 text-left">Key</th>
</tr>
</thead>
<tbody>
Expand All @@ -39,6 +40,7 @@
<%= link_to record.fm_id, fm_archive_path(record.fm_id, table: @selected), class: "text-primary hover:underline" %>
</td>
<td class="border border-gray-200 px-3 py-2"><%= truncate(record.name, length: 100) %></td>
<td class="border border-gray-200 px-3 py-2 font-mono text-xs"><%= record.fm_key_name %></td>
</tr>
<% end %>
</tbody>
Expand Down
8 changes: 8 additions & 0 deletions spec/requests/fm_archives_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,14 @@
expect(response.body).to include("Archie Coded")
end

it "lists each record's key to the right of its name" do
FmRolodex.create!(fm_id: "ROL1", data: { "FirstName" => "Archie", "LastName" => "Coded" })

get fm_archives_path(table: "rolodexes")

expect(response.body).to match(%r{>ROL1</a>\s*</td>\s*<td[^>]*>Archie Coded</td>\s*<td[^>]*>ID</td>})
end

it "marks the selected table as the current page" do
get fm_archives_path(table: "rolodexes")

Expand Down
Loading