views:

198

answers:

2

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  A: 

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
=> "/"
theIV
great to know there is an 'app' in console! thanks !
ez
A: 
> script/console
song = Song.first
edit_song_path(:id=>song.id)

assumes (routes.rb)

   map.resources :songs
ndp