0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

#Rails - rails console で全てのパス・URLを確認する ( e.g `app.methods.grep /_path\Z/` )

0
Last updated at Posted at 2019-12-30

example

bundle exec rails console
[1] pry(main)> app.methods.grep /_path\Z/
[2] pry(main)> app.methods.grep /_url\Z/

app って何よ?

main空間に生えているインスタンスっぽい?

[15] pry(main)> self
=> main
[16] pry(main)> self.app
=> #<ActionDispatch::Integration::Session:0x000055e5817d8540

Rails.application.app とはまた違うようだ。

Ref

rails console の tips - Qiita
https://qiita.com/snaka/items/eeb5dee96e44fca54a2e

Original by Github issue

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?