2014-02-03 19:23:00 +00:00
|
|
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
2013-06-12 15:59:58 +00:00
|
|
|
|
2013-05-29 15:11:11 +00:00
|
|
|
class Taskbar < ApplicationModel
|
2013-05-31 23:10:40 +00:00
|
|
|
store :state
|
|
|
|
store :params
|
2013-08-22 20:56:54 +00:00
|
|
|
before_create :update_last_contact, :set_user
|
|
|
|
before_update :update_last_contact, :set_user
|
2013-05-29 15:11:11 +00:00
|
|
|
|
2013-05-31 23:10:40 +00:00
|
|
|
private
|
2015-05-01 12:31:46 +00:00
|
|
|
|
2013-06-12 15:59:58 +00:00
|
|
|
def update_last_contact
|
|
|
|
self.last_contact = Time.now
|
|
|
|
end
|
2015-05-07 10:27:12 +00:00
|
|
|
|
2013-08-22 20:56:54 +00:00
|
|
|
def set_user
|
|
|
|
self.user_id = UserInfo.current_user_id
|
|
|
|
end
|
2013-05-31 23:10:40 +00:00
|
|
|
end
|