Colin i try what you tell me. It work find. Thank very much. The next step is that: if an user choice the seat on the hall, it must not be appear againt on the view.
I have some view like this: <%= form_tag( riepilogo_path, method: "post", id: "sel") do %> <%= hidden_field_tag "sala", params[:sala] %> <%= hidden_field_tag "spectacle_id", params[:spectacle_id] %> <%= hidden_field_tag "num", params[:num] %> <table> <tr> <th></th> <th>Numero</th> </tr> <% for posti in @postis %> <tr> <td><%= check_box_tag "posti_ids[]", posti.id %></td> <td><%=h posti.numero %></td> </tr> <% end %> </table> <%= submit_tag "OK", id: "sub"%> <% end %> controller of Postis is something like so: class PostisController < ApplicationController def index @postis = Posti.where(:stato => "unchecked" , :spectacle_id => params[:spectacle_id] , :hall_num => params[:sala]) end def posti_multiple @postis = Posti.find(params[:posti_ids]) end end In the Posti's model i have attributes: spectacle_id, hall_num, seat(integer) and stato (:default => "unchecked"). An user choice her seat on the hall. When he submit the form, seats be load in posti_ids[]. I want to update stato of seats wich are present in posti_ids from "unchecked" to "checked" on the database. How can do that. Thank you very much -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/114d0890991ceca48d8abb0d20cc0ffb%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.