ruby on rails - Comments not displaying in songs#show.html.erb -


the comments don't appear showing after submitted (created). if @ songs#show.html.erb you'll see comments code. not sure why aren't showing, i've looked how ryan bates comments , code identical. please advise :)

note: it's worth i'm running rails 4.

your problem in song/show variable @song ok, render comments/_form uses @comment set new comment without song_id set.

yo build comment song_id set id of @song could:

# songs_controller.rb def show   @comment = @song.comments.build end 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -