aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/jobs/mini_environment_job.rb4
-rw-r--r--app/views/shared/_jobs.html.erb2
2 files changed, 5 insertions, 1 deletions
diff --git a/app/jobs/mini_environment_job.rb b/app/jobs/mini_environment_job.rb
index e5112cd..1e41954 100644
--- a/app/jobs/mini_environment_job.rb
+++ b/app/jobs/mini_environment_job.rb
@@ -29,6 +29,10 @@ class MiniEnvironmentJob < Que::Job
end
end
+ def self.job_title(que_job)
+ que_job.args.last.titleize
+ end
+
def self.jobs(mini_environment_id)
QueJob
.where(
diff --git a/app/views/shared/_jobs.html.erb b/app/views/shared/_jobs.html.erb
index 417f8a0..d4c74b6 100644
--- a/app/views/shared/_jobs.html.erb
+++ b/app/views/shared/_jobs.html.erb
@@ -19,7 +19,7 @@
aria-expanded="true"
aria-controls="job_<%= job.id %>"
>
- <%= job.job_class %>
+ <%= job.job_class.constantize.try(:job_title, job) || job.job_class %>
<span class="caret"></span>
</a>
<span class="pull-right">