2871: rename get collections and log collections method names to match the format...
authorradhika <radhika@curoverse.com>
Wed, 4 Jun 2014 17:58:36 +0000 (13:58 -0400)
committerradhika <radhika@curoverse.com>
Wed, 4 Jun 2014 17:58:36 +0000 (13:58 -0400)
apps/workbench/app/controllers/application_controller.rb
apps/workbench/app/views/users/_tables.html.erb

index e39d7760f45ccbc3a7a0e03a8f43c2b2045300c7..3e458bf33c17cff8a8ac9318392c865c669df98f 100644 (file)
@@ -495,15 +495,15 @@ class ApplicationController < ActionController::Base
   end
 
   # helper method to get collections for the given uuid
-  helper_method :get_collections
-  def get_collections uuid
-    preload_collections([uuid])
+  helper_method :collections_for_object
+  def collections_for_object uuid
+    preload_collections_for_objects([uuid])
     @all_collections_for[uuid]
   end
 
   # helper method to preload collections for the given uuids
-  helper_method :preload_collections
-  def preload_collections uuids
+  helper_method :preload_collections_for_objects
+  def preload_collections_for_objects uuids
     @all_collections_for ||= {}
     if not uuids.select { |x| @all_collections_for[x].nil? }.any?
       # already preloaded for all of these uuids
@@ -521,17 +521,17 @@ class ApplicationController < ActionController::Base
   end
 
   # helper method to get log collections for the given log
-  helper_method :get_log_collections
-  def get_log_collections log
+  helper_method :log_collections_for_object
+  def log_collections_for_object log
     fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(log)
     uuid = fixup[1]
-    preload_log_collections([uuid])
+    preload_log_collections_for_objects([uuid])
     @all_log_collections_for[uuid]
   end
 
   # helper method to preload collections for the given uuids
-  helper_method :preload_log_collections
-  def preload_log_collections logs
+  helper_method :preload_log_collections_for_objects
+  def preload_log_collections_for_objects logs
     uuids = []
     logs.each do |log|
       fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(log)
index bfce00f83bac536cadf55593eadbe0674c4b9c35..a87cd1dd0a76460e2d6926753b1ec2632d3bc093 100644 (file)
@@ -33,8 +33,8 @@
             job_logs << j.log
           end
 
-          preload_collections job_outputs
-          preload_log_collections job_logs
+          preload_collections_for_objects job_outputs
+          preload_log_collections_for_objects job_logs
         %>
         <% @my_jobs[0..6].each do |j| %>
           <tr data-object-uuid="<%= j.uuid %>">
@@ -48,7 +48,7 @@
               <small>
                 <% if j.success and j.output %>
                   <a href="<%= collection_path(j.output) %>">
-                    <% collections = get_collections(j.output) %>
+                    <% collections = collections_for_object(j.output) %>
                       <% if collections && !collections.empty? %>
                       <% c = collections.first %>
                       <% c.files.each do |file| %>
@@ -63,7 +63,7 @@
 <td>
   <small>
     <% if j.log %>
-      <% log_collections = get_log_collections(j.log) %>
+      <% log_collections = log_collections_for_object(j.log) %>
       <% if log_collections && !log_collections.empty? %>
         <% c = log_collections.first %>
         <% c.files.each do |file| %>