Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,25 @@ irb(main):001:0>

## Custom Rails prompt

If you want to include the current Rails environment and project name in the pry prompt, put the following lines in your project's `.pryrc`:
If you want to permanently include the current Rails environment and project name
in the Pry prompt, put the following lines in your project's `.pryrc`:

```ruby
if defined?(PryRails::RAILS_PROMPT)
Pry.config.prompt = PryRails::RAILS_PROMPT
Pry.config.prompt = Pry::Prompt[:rails][:value]
```

If `.pryrc` could be loaded without pry-rails being available or installed,
guard against setting `Pry.config.prompt` to `nil`:

```ruby
if Pry::Prompt[:rails]
Pry.config.prompt = Pry::Prompt[:rails][:value]
end
```

Check out `change-prompt --help` for information about temporarily
changing the prompt for the current Pry session.

# Developing and Testing

This repo uses [Roadshow] to generate a [Docker Compose] file for each
Expand Down