The problem: I have a collection of people, I want to have a revise.html page that allows me to increment a integer on all the people.
if I make a new method in the people_controller it auto sends me to people/revise.. which gets interpreted as show/revise... which is not an id.
I understand this happens because of REST constrictions. But I dont really get how I should be doing this update to all the records.
Am I to make a new controller for the revision revisement? or do I modifie the update method inside of the people_controller.
here is some code for my revise.html.erb:
<h1>Update the All Bio's Revision'</h1>
<% form_for(@people) do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :version %><br />
<%= f.text_field :version %>
</p>
<p>
<%= f.submit "Update Revision" %>
</p>
<% end %>
<%= link_to 'Back', people_path %>
I want this to then submit its param from the text field and update all the people
@people = Person.find(:all)
@people.each do |person|
person.version = params(:version)
end
Yeah I just dont know if I am getting this new syntax of rails 2 and such.
Thanks for any help everyone!