Change html form id generated by form_for rails 3.1

Adding on to what miked said, the easiest way to make unique form id’s for the posts would be to use the post’s id numbers in the id attribute, like so:

<%= form_for [post, Comment.new,], :remote => true, :html => { :id => "new_comment_on_#{post.id}" } do |f| %>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)