- <table class="table table-sm table-borderless mapkey-table mb-0">
- <% YAML.load_file(Rails.root.join("config/key.yml")).each do |name,data| %>
- <% data.each do |entry| %>
- <%= tag.tr :class => "mapkey-table-entry", :data => { :layer => name, :zoom_min => entry["min_zoom"], :zoom_max => entry["max_zoom"] } do %>
- <td class="mapkey-table-key align-middle">
+ <table class="table table-sm table-borderless mb-0 align-middle">
+ <% @key.each do |layer_name, layer_data| %>
+ <% layer_data.each do |entry| %>
+ <%= tag.tr :class => "mapkey-table-entry", :data => { :layer => layer_name, :zoom_min => entry["min_zoom"], :zoom_max => entry["max_zoom"] } do %>
+ <td>