aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/command/actions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/command/actions.rb')
-rw-r--r--railties/lib/rails/command/actions.rb10
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