summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Košanová <jarka@gitlab.com>2018-09-24 22:50:41 +0200
committerJarka Košanová <jarka@gitlab.com>2018-09-24 22:50:41 +0200
commitf4c861db6ad1c5373b404902560366a1405523c9 (patch)
treea67cfaacbd11263f0b8e0393fb488be2a862cb37
parent3a7c29417d71502ff4da74fedf84e71fc7c68754 (diff)
downloadgitlab-ce-f4c861db6ad1c5373b404902560366a1405523c9.tar.gz
Add name definition for table method
-rw-r--r--spec/support/helpers/migrations_helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/helpers/migrations_helpers.rb b/spec/support/helpers/migrations_helpers.rb
index 0bc235701eb..0c35764ed9a 100644
--- a/spec/support/helpers/migrations_helpers.rb
+++ b/spec/support/helpers/migrations_helpers.rb
@@ -3,6 +3,10 @@ module MigrationsHelpers
Class.new(ActiveRecord::Base) do
self.table_name = name
self.inheritance_column = :_type_disabled
+
+ def self.name
+ table_name.singularize.camelcase
+ end
end
end