ruby on rails - http://localhost:3000/songs/10 id error? -
when submitting (creating) song on app redirected http://localhost:3000/songs/10
example see "the page isn't redirecting properly". reason song_id
10 when should 1 i've deleted songs database.
if @ songs_controller.rb songs#show.html.erb see code think may causing problem. i've associated of models correctly following rails.api directions. not sure why getting 'problem loading page error' message after creating song. i've looked how ryan bates , code identical. please advise :)
activerecord hands out successive ids records, starting 1. delete records, ids never go lower number.
so if add 10 songs, , delete 9, add song, song id 11.
each database table remember last id handed out, , next id +1 larger last id.
Comments
Post a Comment