Quellcode durchsuchen

Fixed Rails 5 deprecation warning

Andrew Kane vor 7 Jahren
Ursprung
Commit
ac24fc9d62
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1 1
      app/views/blazer/checks/index.html.erb
  2. 1 1
      app/views/blazer/queries/run.html.erb

+ 1 - 1
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>

+ 1 - 1
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 %>