瀏覽代碼

Fixed Rails 5 deprecation warning

Andrew Kane 7 年之前
父節點
當前提交
ac24fc9d62
共有 2 個文件被更改,包括 2 次插入2 次删除
  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 %>