I have been looking for a solution but it was imposible. I hope it is well explained.
I have a list of users with a small form to change one of the attributes in the DB (that attribute is to know that the user has done the check-in).

There is also a searcher that shows the result with AJAX so that all the page won’t be reloaded. When I load the page for the first time the browser renders HTML and the Save button works as expected. But when I use the searcher and the list appears (using JS) the submit button doesn’t work. In Mozilla Firefox does nothing at all and in Google Chrome I get this error: No route matches "user's profile route". The searcher works fine (shows the correct users). I use Rails 3.0.1 and Ruby 1.8.7
check_in.html.erb
Here is the searcher and the render call
<%= form_tag({:controller => "admins", :action => "check_in"}, :id => "users_search", :method => "get", :html => {:autocomplete => "off"}) do %>
<%= hidden_field_tag :selected_event_id, params[:selected_event_id] %>
<p>
<%= text_field_tag :search, params[:search] %>
<%= submit_tag "Search", :name => nil %>
</p>
<% end %>
<div id="check_in"><%= render :partial => 'check_in' %></div>
_check_in.html.erb
This is the partial that renders above
<%@event_user_infos.each do |user_info|subscription = Subscription.find(:first, :conditions => ["user_id = ? and event_id = ?", user_info.user_id, params[:selected_event_id]])%>
<%= simple_form_for(subscription) do |f| %>
<%= f.hidden_field :user_id %>
<%= f.hidden_field :event_id %>
<tr>
<td><%= link_to user_info.name, subscription %></td>
<td><%= user_info.company %></td>
<td><%= user_info.user.email %></td>
<td><%= subscription.networkId %></td>
<td><%= f.input :token, :input_html => { :size => 15, :maxlength => 15 }, :as => :integer, :label => false %></td>
<td width='5px'>
<%= f.submit 'save' %>
</td>
</tr>
<% end %>
<% end %>
admins_controller.rb
I only put the relevant part of the code
def check_in
event_id = params[:selected_event_id]
if !event_id.nil?
session[:event_id] = event_id
@event_user_infos = UserInfo.search(params[:search],event_id).order(sort_column + ' ' + sort_direction)
end
end
check_in.js.erb
$('#check_in').html('<%= escape_javascript(render :partial => 'check_in') %>');
EDIT
I added a conditional:remote => remote option (if there is a search remote == true and if is not remote == false) to the partial’s form and the error in Google Chrome disappeared, but it still does nothing (now in both browsers). I also checked the HTML source and it seems to be OK.
I finally managed to solve the problem. I changed
<%= javascript_include_tag :defaults%>line of code for<%= javascript_include_tag 'prototype'%>inapplication.html.erbfile and it works now in both browsers.