summaryrefslogtreecommitdiff
path: root/app/models/timelog.rb
diff options
context:
space:
mode:
authorRuben Davila <rdavila84@gmail.com>2016-12-23 00:44:02 -0500
committerRuben Davila <rdavila84@gmail.com>2017-01-15 11:10:04 -0500
commit17196a2ff31c4eb65fa9ecff6f7208171e26059b (patch)
treee9a491799b764c42f3c0c20cb33fa763ebb520df /app/models/timelog.rb
parent64dd41a0e21360c380cab394f8a5c9b4945b7fd1 (diff)
downloadgitlab-ce-17196a2ff31c4eb65fa9ecff6f7208171e26059b.tar.gz
Backport backend work for time tracking.
Diffstat (limited to 'app/models/timelog.rb')
-rw-r--r--app/models/timelog.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/timelog.rb b/app/models/timelog.rb
new file mode 100644
index 00000000000..f768c4e3da5
--- /dev/null
+++ b/app/models/timelog.rb
@@ -0,0 +1,6 @@
+class Timelog < ActiveRecord::Base
+ validates :time_spent, :user, presence: true
+
+ belongs_to :trackable, polymorphic: true
+ belongs_to :user
+end