Module: GovernorBackground::Controllers::Methods
- Defined in:
- lib/governor_background/controllers/methods.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(c) ⇒ Object
4 5 6 |
# File 'lib/governor_background/controllers/methods.rb', line 4 def self.included(c) c.before_filter :show_recent_statuses end |
Instance Method Details
#show_recent_statuses ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/governor_background/controllers/methods.rb', line 8 def show_recent_statuses finished_jobs = GovernorBackground::JobManager.finished_jobs unless finished_jobs.blank? flash[:governor_background] = finished_jobs.map do |job| [job.status, t("#{job.name}_#{job.status}", :message => job., :default => [job.status, job.status.to_sym], :scope => :governor_background)] end end end |