What do I have to do so that this will work in the console (assuming song
is defined, obviously):
edit_song(:id => song.id)
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
=> "/"
> script/console
song = Song.first
edit_song_path(:id=>song.id)
assumes (routes.rb)
map.resources :songs
The following imports named helpers for me in 3.2.8:
> include Rails.application.routes.url_helpers