使用正常的非远程请求时,此表单 100% 有效。但是,当我设置 remote => true 时,它不再发送提交值。我应该完全不同地做这件事,还是我遗漏了什么?
<%= form_tag [voteable, Vote.new], :remote => true do |f| %>
<strong class="votes_balance"><%= voteable.votes_for - voteable.votes_against %></strong>
<%= submit_tag :up, { :name => "thumb_direction", :class => "vote_up" } %>
<%= submit_tag :down, { :name => "thumb_direction", :class => "vote_down" } %>
<%= hidden_field_tag :voteable_type, voteable.class %>
<% end %>
参数
authenticity_token /8Dkx/EQc+VqgZd8f/eoWevm8AIgOwK0rzXqlGUzDUA=
utf8 ✓
voteable_type Article
应该发送
authenticity_token /8Dkx/EQc+VqgZd8f/eoWevm8AIgOwK0rzXqlGUzDUA=
utf8 ✓
voteable_type Article
thumb_direction up