[issue #430] Changed task

This commit is contained in:
George Vinogradov 2012-05-11 22:00:27 +04:00
parent 1a9f529152
commit b74dd01262
2 changed files with 3 additions and 9 deletions

View File

@ -99,10 +99,8 @@ class BuildList < ActiveRecord::Base
before_create :set_default_status
after_create :place_build
class << self
def human_status(status)
I18n.t("layout.build_lists.statuses.#{HUMAN_STATUSES[status]}")
end
def self.human_status(status)
I18n.t("layout.build_lists.statuses.#{HUMAN_STATUSES[status]}")
end
def human_status

View File

@ -8,11 +8,7 @@ namespace :buildlist do
outdated = BuildList.outdated
say "There are #{outdated.count} outdated BuildLists at #{Time.now}"
begin
BuildList.outdated.map(&:destroy)
rescue Exception => e
say "There was an error: #{e.message}"
end
BuildList.outdated.destroy_all
say "Outdated BuildLists was successfully removed"
end