Testing routes in the console

前端 未结 3 1545
-上瘾入骨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:41

    > script/console
    song = Song.first
    edit_song_path(:id=>song.id)
    

    assumes (routes.rb)

       map.resources :songs
    

提交回复
热议问题