mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 06:09:15 +08:00
updated checks of environment with Rails.env by Rails.env methods
This commit is contained in:
@ -9,7 +9,7 @@ require_relative '../lib/discourse_plugin_registry'
|
||||
# Global config
|
||||
require_relative '../app/models/global_setting'
|
||||
|
||||
require 'pry-rails' if Rails.env == "development"
|
||||
require 'pry-rails' if Rails.env.development?
|
||||
|
||||
if defined?(Bundler)
|
||||
Bundler.require(*Rails.groups(assets: %w(development test profile)))
|
||||
@ -18,7 +18,7 @@ end
|
||||
module Discourse
|
||||
class Application < Rails::Application
|
||||
def config.database_configuration
|
||||
if Rails.env == "production"
|
||||
if Rails.env.production?
|
||||
GlobalSetting.database_config
|
||||
else
|
||||
super
|
||||
|
Reference in New Issue
Block a user