diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-01-25 00:07:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-25 00:07:33 +0100 |
commit | 5f7d5995a65d97f2592213889672e9c4799556ec (patch) | |
tree | 57f86259e136d70bcda53006c3dd51522b144402 /railties/lib/rails/command | |
parent | 1b7f0283b939773bdc91730f8b0494e37d469de9 (diff) | |
parent | a39aa99c8145e6782bffa1effd4f3678cab6b794 (diff) | |
download | rails-5f7d5995a65d97f2592213889672e9c4799556ec.tar.gz rails-5f7d5995a65d97f2592213889672e9c4799556ec.tar.bz2 rails-5f7d5995a65d97f2592213889672e9c4799556ec.zip |
Merge pull request #34789 from christos/fix-editing-new-environment-credentials
Don't load app environment when editing credentials
Diffstat (limited to 'railties/lib/rails/command')
-rw-r--r-- | railties/lib/rails/command/actions.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails/command/actions.rb b/railties/lib/rails/command/actions.rb index cbb743346b..50651ad61a 100644 --- a/railties/lib/rails/command/actions.rb +++ b/railties/lib/rails/command/actions.rb @@ -11,10 +11,20 @@ module Rails end def require_application_and_environment! + require_application! + require_environment! + end + + def require_application! require ENGINE_PATH if defined?(ENGINE_PATH) if defined?(APP_PATH) require APP_PATH + end + end + + def require_environment! + if defined?(APP_PATH) Rails.application.require_environment! end end |