Skip to content

Business intelligence made simple

Fixed Rails 5 deprecation warning

Andrew Kaneac24fc9d6280
diff --git a/app/views/blazer/checks/index.html.erb b/app/views/blazer/checks/index.html.erb
index e833f707..11d833ed 100644
--- a/app/views/blazer/checks/index.html.erb
+++ b/app/views/blazer/checks/index.html.erb
@@ -19,7 +19,7 @@
<td><%= link_to check.query.name, check.query %> <span class="text-muted"><%= check.try(:check_type).to_s.gsub("_", " ") %></span></td>
<td>
<% if check.state %>
- <small class="check-state <%= check.state.parameterize("_") %>"><%= check.state.upcase %></small>
+ <small class="check-state <%= check.state.parameterize.gsub("-", "_") %>"><%= check.state.upcase %></small>
<% end %>
</td>
<td><%= check.schedule if check.respond_to?(:schedule) %></td>
diff --git a/app/views/blazer/queries/run.html.erb b/app/views/blazer/queries/run.html.erb
index 734979db..a938a608 100644
--- a/app/views/blazer/queries/run.html.erb
+++ b/app/views/blazer/queries/run.html.erb
@@ -28,7 +28,7 @@
<%= pluralize(@rows.size, "row") %>
<% @checks.select(&:state).each do |check| %>
- &middot; <small class="check-state <%= check.state.parameterize("_") %>"><%= link_to check.state.upcase, edit_check_path(check) %></small>
+ &middot; <small class="check-state <%= check.state.parameterize.gsub("-", "_") %>"><%= link_to check.state.upcase, edit_check_path(check) %></small>
<% if check.try(:message) %>
&middot; <%= check.message %>
<% end %>