aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/script_rails_loader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/script_rails_loader.rb')
-rw-r--r--railties/lib/rails/script_rails_loader.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/script_rails_loader.rb b/railties/lib/rails/script_rails_loader.rb
index 91672e5d81..7054089614 100644
--- a/railties/lib/rails/script_rails_loader.rb
+++ b/railties/lib/rails/script_rails_loader.rb
@@ -17,11 +17,11 @@ module Rails
rescue SystemCallError
# could not chdir, no problem just return
end
-
+
def self.in_rails_application?
File.exists?(SCRIPT_RAILS)
end
-
+
def self.in_rails_application_subdirectory?(path = Pathname.new(Dir.pwd))
File.exists?(File.join(path, SCRIPT_RAILS)) || !path.root? && in_rails_application_subdirectory?(path.parent)
end