diff options
author | Keith Gable <ziggy@ignition-project.com> | 2014-10-17 16:12:44 -0700 |
---|---|---|
committer | Keith Gable <ziggy@ignition-project.com> | 2014-10-21 11:09:34 -0700 |
commit | 5024f6180afb19085d77e0378e1375a42a91d2b5 (patch) | |
tree | 24fbbafbfb45218fbc8657d18f7bb1fb8cc85ffd /activerecord/lib/active_record/errors.rb | |
parent | 40e904df37253301c23f8abf87135d751bddfa9c (diff) | |
download | rails-5024f6180afb19085d77e0378e1375a42a91d2b5.tar.gz rails-5024f6180afb19085d77e0378e1375a42a91d2b5.tar.bz2 rails-5024f6180afb19085d77e0378e1375a42a91d2b5.zip |
If Rails is not defined, check ENV["RAILS_ENV"] and ENV["RACK_ENV"].
This fixes a regression introduced by 6cc03675d30b58e28f585720dad14e947a57ff5b.
ActiveRecord, if used without Rails, always checks the "default_env" environment. This would be OK, except that Sinatra also supports environments,
and it runs with {RACK|RAILS}_ENV=production. This patch adds a fallback to RAILS_ENV and RACK_ENV (and ultimately default_env) if Rails.env doesn't exist.
Diffstat (limited to 'activerecord/lib/active_record/errors.rb')
0 files changed, 0 insertions, 0 deletions