Skip to content

Commit

Permalink
Update the readme documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
robert committed Nov 29, 2018
1 parent 6794e33 commit 4e8e66d
Showing 1 changed file with 14 additions and 3 deletions.
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

0 comments on commit 4e8e66d

Please sign in to comment.