Ah ha! The culprit is your button_to
calls. Check out the documentation for button_to
. As you will see, that helper wraps itself in a mini HTML form. In your case, its creating a form within a form, which is invalid.
You should be able to do the exact same action using link_to
instead. So your button_to
will end up looking like this:
<%= link_to 'Delete', post_path(post), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %>
Try that and let me know if it makes a difference.