Merge branch 'blackst0ne-add-rails5-method' into 'master'
[Rails5] Add `Gitlab.rails5?` method See merge request gitlab-org/gitlab-ce!17660
This commit is contained in:
commit
92e119859d
1 changed files with 6 additions and 0 deletions
|
@ -194,4 +194,10 @@ module Gitlab
|
||||||
Gitlab::Routing.add_helpers(MilestonesRoutingHelper)
|
Gitlab::Routing.add_helpers(MilestonesRoutingHelper)
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue