Duplicate render problem

When I invoke the code below, there seems to be duplicate rendering
going on. That is, the “render :update do |page|” block seems to be
executing twice… or at least that’s what I think is going on because
I see the exact same block-produced output twice in my browser. Maybe
my diagnosis is wrong, but I get the same behavior in both Firefox and
IE7. Either way, could anybody help me figure out what’s going on here
and how to fix it? This has been baffling me for hours! Thanks!

Here are the relevant code fragments:

VIEW (i.e., containing the element to be updated)

CONTROLLER
def show_slot
@slot=Slot.find(params[:slot][:id])
render :update do |page|
page.insert_html :before, ‘new_slot’, :inline=>"<%=
make_field(@slot)%>
"
end
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs