instance method short_rails_root

Ruby on Rails edge

Since edge

Signature

short_rails_root()

No documentation comment.

Source
# File railties/lib/rails/commands/console/irb_console.rb, line 170
      def short_rails_root
        root = Rails.root.to_s
        home = ENV["HOME"]
        home && (root == home || root.start_with?("#{home}/")) ? "~#{root[home.size..]}" : root
      end

Defined in railties/lib/rails/commands/console/irb_console.rb line 170 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Console::IRBConsole

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close