From 36bedfb7f37931a33d9af586296404c02c3ab80e Mon Sep 17 00:00:00 2001 From: blackst0ne Date: Thu, 22 Mar 2018 09:37:57 +1100 Subject: [Rails5] Update files by `rails app:update` --- config/environment.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'config/environment.rb') diff --git a/config/environment.rb b/config/environment.rb index df3006d349c..487a4564b47 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,11 @@ # Load the rails application -require File.expand_path('../application', __FILE__) + +# Remove this condition when upgraded to rails 5.0. +if %w[1 true].include?(ENV["RAILS5"]) + require_relative 'application' +else + require File.expand_path('../application', __FILE__) +end # Initialize the rails application Rails.application.initialize! -- cgit v1.2.1