summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-03-09 09:26:49 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-03-09 09:26:49 +0000
commit92e119859d40145267e3a5fcb259df69090a1e72 (patch)
tree6e81f2134b0a304d727a1d6f994ddc8abee61de2 /config
parent47b9854dac5d255f0ad68cb3310c66a7111b792e (diff)
parent1fe02c3c3ae64484887e52c257dc51fa6235ec10 (diff)
downloadgitlab-ce-92e119859d40145267e3a5fcb259df69090a1e72.tar.gz
Merge branch 'blackst0ne-add-rails5-method' into 'master'
[Rails5] Add `Gitlab.rails5?` method See merge request gitlab-org/gitlab-ce!17660
Diffstat (limited to 'config')
-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