Moved to before filter.

This commit is contained in:
Martin Edenhofer 2015-05-01 16:26:28 +02:00
parent 0e6fde30d0
commit cf2ce642ef

View file

@ -3,11 +3,11 @@
class Observer::Ticket::CloseTime < ActiveRecord::Observer
observe 'ticket'
def after_create(record)
def before_create(record)
_check(record)
end
def after_update(record)
def before_update(record)
_check(record)
end
@ -29,8 +29,5 @@ class Observer::Ticket::CloseTime < ActiveRecord::Observer
# set close_time
record.close_time = Time.now
# save ticket
record.save
end
end