Testing routes in the console

前端 未结 3 1504
-上瘾入骨i
-上瘾入骨i 2021-01-31 03:10

What do I have to do so that this will work in the console (assuming song is defined, obviously):

edit_song(:id => song.id)
3条回答
  •  隐瞒了意图╮
    2021-01-31 03:32

    You have access to an app object which you can use to test routes on.

    >> app.root_url
    => "http://www.example.com/"
    >> app.root_path
    => "/"
    

提交回复
热议问题