summaryrefslogtreecommitdiff
path: root/lib/ci/model.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-25 18:42:46 -0700
committerDouwe Maan <douwe@gitlab.com>2015-08-25 18:42:46 -0700
commit046b28312704f3131e72dcd2dbdacc5264d4aa62 (patch)
treea8c2b14a6e1db3b662fee2c79af70d9fcb643c2e /lib/ci/model.rb
parente449426a4e7d15cdd582d4f136add52cbfb5e04e (diff)
downloadgitlab-ce-046b28312704f3131e72dcd2dbdacc5264d4aa62.tar.gz
Groundwork for merging CI into CE
Diffstat (limited to 'lib/ci/model.rb')
-rw-r--r--lib/ci/model.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ci/model.rb b/lib/ci/model.rb
new file mode 100644
index 00000000000..c42a0ad36db
--- /dev/null
+++ b/lib/ci/model.rb
@@ -0,0 +1,11 @@
+module Ci
+ module Model
+ def table_name_prefix
+ "ci_"
+ end
+
+ def model_name
+ @model_name ||= ActiveModel::Name.new(self, nil, self.name.split("::").last)
+ end
+ end
+end