Skip to content

Commit

Permalink
Update prompt syntax for Pry v0.13.0
Browse files Browse the repository at this point in the history
Version 0.13.0 of Pry changed the way that prompts are configured and 
added. Specifically, setting the prompt via an array of two procs is now 
deprecated. This commit updates the README documentation so that 
warnings are no longer emitted when running `rails console` at the 
command line and fixes #118.

See the Pry CHANGELOG for more information:
https://github.com/pry/pry/blob/master/CHANGELOG.md
  • Loading branch information
CHTJonas authored Apr 10, 2020
1 parent 8bea87d commit cdd6a1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ If you want to permanently include the current Rails environment and project nam
in the Pry prompt, put the following lines in your project's `.pryrc`:

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

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]
Pry.config.prompt = Pry::Prompt[:rails]
end
```

Expand Down

0 comments on commit cdd6a1b

Please sign in to comment.