trabajo-afectivo/app/models/taskbar.rb

17 lines
405 B
Ruby
Raw Normal View History

2014-02-03 19:23:00 +00:00
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
2013-05-29 15:11:11 +00:00
class Taskbar < ApplicationModel
2013-05-31 23:10:40 +00:00
store :state
store :params
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
def update_last_contact
self.last_contact = Time.now
end
def set_user
self.user_id = UserInfo.current_user_id
end
2013-05-31 23:10:40 +00:00
end