Преглед на файлове

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