Forum: Ruby on Rails AJAX not displaying - due to action not complete?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sean H. (Guest)
on 2006-04-18 23:52
(Received via mailing list)
Hi everyone,

I've got a pair of AJAX actions that use slide_up and slide_down to
toggle the editing of some info.  You first see a table of
entitlements for a user.  Clicking "Change these" slides that up and
then a full table comes down, displaying all possible entitlements for
that user.  Remove and Add links are next to the appropriate
entitlements.  When finished, clicking "I'm finished" slides the big
table back up and the new smaller table back down.

In dev, this works great.  Of course, doing dev on the same machine as
the database.

In live, it works sporadically.  The movement is choppy, flashy (like,
here one split-second and gone the next), and sometimes the table
doesn't return.

The whole thing depends upon calls to a db (pgsql on a remote host)
and to LDAP.  I'm wondering if the LDAP calls don't happen quickly
enough, so the whole process dies.  The production machine is closer
in terms of network than my dev machine, so I don't know if that's the

Do my link_to_remote calls look ok?

<%= link_to_remote("Change Entitlements", :update => "entitlements",
                    :url => { :action => "change_entitlements", :id => },
                    :before => visual_effect(:slide_up,
"entitlements", :duration => 0.5),
                    :complete => visual_effect(:slide_down,
"entitlements", :duration => 0.5) ) %>

<%= link_to_remote("I'm done changing entitlements", :update =>
                    :url => { :action => "show_entitlements", :id => },
                    :before => visual_effect(:slide_up,
"entitlements", :duration => 0.5),
                    :complete => visual_effect(:slide_down,
"entitlements", :duration => 0.5) ) %>

And the accompanying controller methods:

  def change_entitlements
    @person = Person.find(params[:id])
    render(:layout => false)

  def show_entitlements
    @person = Person.find(params[:id])
    @ldap_person = @person.ldap_user
    render :partial => "entitlements", :object =>

Any idea why it might not be behaving correctly?


This topic is locked and can not be replied to.