When I add or remove users in the contact list, changes are
immediately reflected in the conacts_for_lookup js array. Indicating
But after a while, the js array is empty:
var contacts = new Array(0);
Is there a caching issue, causing the method not to be executed every
If I logout and in again, the array is back.
I´m running in development environment.
<script src="/contacts/contacts_for_lookup" type="text/
@contacts = Contact.find(:all,
:conditions => "company =
render :layout => false
var contacts = new Array(<%= @contacts.size %>);
<% @contacts.each_with_index do |contact, index| %>
contacts[<%= index %>] = "<%= contact.name %>";
<% end %>
Any tips or hints are highly appreciated!