1
我在控制器中得到了下面的方法(ProductController的,例如)。Rails的:當雙鏈接上點擊,兩個彈出式窗口打開
def show
respond_with do |format|
format.html do
if request.xhr?
@product = ...
render :status => 200, :partial => 'products/show'
end
end
end
end
當用戶點擊產品鏈接時,彈出窗口將打開產品圖片和說明。
問題:當產品鏈接給定用戶雙擊,雙彈出窗口打開。調試時,我注意到,ProductController#show
方法被調用一次,但仍然是兩個彈出窗口被打開。