Commit 704662bac495b8d5e55cea83cb83ce1dbaba2ba9

Authored by Rafael Manzo
1 parent 4e2da6de

Fix module tree loading

Due to the kalibro_client upgrade, metric granularities are now actual
object instances instead of hashes.
app/views/modules/_module_result.html.erb
... ... @@ -7,6 +7,6 @@
7 7 <% end %>
8 8 <%= link_to format_module_name(module_result.kalibro_module.name), "#module_#{module_result.id}", onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} #{escape_javascript(t('loading_data'))}', #{module_result.id});" %>
9 9 </td>
10   - <td><%= module_result.kalibro_module.granularity["type"] %></td>
  10 + <td><%= module_result.kalibro_module.granularity %></td>
11 11 <td><%= format_grade(module_result.grade) %></td>
12 12 </tr>
... ...
app/views/modules/_module_tree.html.erb
... ... @@ -4,7 +4,7 @@
4 4 </p>
5 5 <p>
6 6 <strong><%= KalibroModule.human_attribute_name('granularity') %>:</strong>
7   - <%= @root_module_result.kalibro_module.granularity["type"] %>
  7 + <%= @root_module_result.kalibro_module.granularity %>
8 8 </p>
9 9 <p>
10 10 <strong><%= KalibroModule.human_attribute_name('grade') %>:</strong>
... ...