I am using rails 3.2.8 and I am having an issue with form_for:
I have the following form within the view of a different model:
<%= form_for pair, { :method => :put } do |f| %>
<td><%= pair.token.value %></td>
<td><%= pair.pair_token.value %></td>
<td><%= pair.freq %></td>
<td><%= pair.distance %></td>
<td><%= f.select :distance, [['', nil], ['Strongly Opposite', -3], ['Moderately Opposite', -2], ['Weakly Opposite', -1],
['No Relationship', 0], ['Weakly Similar', 1], ['Moderately Similar', 2], ['Strongly Similar', 3]], {}, {} %></td>
<td><%= pair.agree %></td>
<td><%= f.select :agree, [['', nil],['True', 1], ['False', 0]], {}, {} %></td>
<td><%= f.submit %></td>
<% end %>
This form is within the view for a model called tokens. The page is actually the tokens show.html. I am getting the response:
No route matches [POST] "/pairs/269671"
I am not sure what is going wrong as I am asking for the PUT action and the pair object is trying to do a post.
Thanks