trabajo-afectivo/app/models/sla.rb

17 lines
416 B
Ruby
Raw Normal View History

require 'cache'
2013-02-01 08:53:14 +00:00
class Sla < ApplicationModel
store :condition
store :data
validates :name, :presence => true
2013-03-07 07:13:56 +00:00
2013-03-07 10:34:42 +00:00
after_create :escalation_calculation_rebuild
after_update :escalation_calculation_rebuild
after_destroy :escalation_calculation_rebuild
2013-03-07 07:13:56 +00:00
private
def escalation_calculation_rebuild
Cache.delete( 'SLA::List::Active' )
2013-03-07 07:13:56 +00:00
Ticket.escalation_calculation_rebuild
end
2013-02-01 08:53:14 +00:00
end