Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Davila <rdavila84@gmail.com>2016-12-23 08:44:02 +0300
committerRuben Davila <rdavila84@gmail.com>2017-01-15 19:10:04 +0300
commit17196a2ff31c4eb65fa9ecff6f7208171e26059b (patch)
treee9a491799b764c42f3c0c20cb33fa763ebb520df /app/models/timelog.rb
parent64dd41a0e21360c380cab394f8a5c9b4945b7fd1 (diff)
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