Search code examples
ruby-on-railsrubyruby-on-rails-4ruby-on-rails-4.2rails-4-2-1

Mark a checkbox, click on button and pass it for other view


I have a table with many authorizations:

(...)    
<% @authorizations.each do |authorization| %>
       <tr>
         <td><%= check_box_tag 'authorization_checked' %></td>
         <td><%= authorization.number_contract %></td>
       </tr>
    <% end %>

I mark the checkbox and after click on button:

<%= link_to 'Reserve', new_refinance_path(:search_func_cpf => params[:search_func_cpf], :search_func_registry => params[:search_func_registry]) %>

How make for after click on button pass only the authorizations checked for other view? What I need make for show this?


Solution

  • I got it! It is My solution, created a repository for this, take a look on code:

    https://github.com/eltonsantos/playing_checkboxes