diff options
| author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-03-09 17:25:17 +1100 |
|---|---|---|
| committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-03-09 17:25:17 +1100 |
| commit | 1fe02c3c3ae64484887e52c257dc51fa6235ec10 (patch) | |
| tree | cd8ed4550e3e98a25431dd3aab3cde43b9b9737d | |
| parent | 7734e85bc6592c5ad3330c611c5f83a051b680b0 (diff) | |
| download | gitlab-ce-blackst0ne-add-rails5-method.tar.gz | |
Add Gitlab.rails5? methodblackst0ne-add-rails5-method
| -rw-r--r-- | config/application.rb | 6 |
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 |
