Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9179713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:52:08+00:00 2026-06-17T17:52:08+00:00

I have been looking for a solution but it was imposible. I hope it

  • 0

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).

enter image description here

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:52:09+00:00Added an answer on June 17, 2026 at 5:52 pm

    I finally managed to solve the problem. I changed <%= javascript_include_tag :defaults%> line of code for <%= javascript_include_tag 'prototype'%> in application.html.erb file and it works now in both browsers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking for a solution to this for a while but can
I have been looking around for a solution that implements this, but google always
I'm new to web development, but I have been looking ofr a solution to
I have been looking for a solution for this, but couldn't find any. I
I have been looking in google for a solution to my problem but no
i have been looking for a solution, but i cant seem to find it.
I have been looking for a solution to my problem. But my code seems
I have been looking everywhere but can't seem to find a good solution for
I have been looking through the archives but can't find a solution that works,
Hi I have been looking around for this solution but cannot find it. Have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.