class method
self.root
Ruby on Rails 6.0.6
Since v5.2.8.1Signature
self.root()
Returns the root of the Rails engine or app running the command.
Source
# File railties/lib/rails/command.rb, line 77
def root
if defined?(ENGINE_ROOT)
Pathname.new(ENGINE_ROOT)
elsif defined?(APP_PATH)
Pathname.new(File.expand_path("../..", APP_PATH))
end
end
Defined in railties/lib/rails/command.rb line 77
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Command