summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2018-03-09 17:25:17 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2018-03-09 17:25:17 +1100
commit1fe02c3c3ae64484887e52c257dc51fa6235ec10 (patch)
treecd8ed4550e3e98a25431dd3aab3cde43b9b9737d
parent7734e85bc6592c5ad3330c611c5f83a051b680b0 (diff)
downloadgitlab-ce-blackst0ne-add-rails5-method.tar.gz
Add Gitlab.rails5? methodblackst0ne-add-rails5-method
-rw-r--r--config/application.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index 74fe3e439ed..ac6e4be4282 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -194,4 +194,10 @@ module Gitlab
Gitlab::Routing.add_helpers(MilestonesRoutingHelper)
end
end
+
+ # This method is used for smooth upgrading from the current Rails 4.x to Rails 5.0.
+ # https://gitlab.com/gitlab-org/gitlab-ce/issues/14286
+ def self.rails5?
+ ENV["RAILS5"].in?(%w[1 true])
+ end
end