步驟,調試器拒絕跨過當我執行語句「下一步」Ruby調試不會超過
它似乎總是步入聲明
debugger
params[:appointment][:user_id] =
User.where(email: appointment_params[:user_id]).pluck(:id).first if appointment_params[:user_id].to_i == 0
params[:appointment][:country_id] =
Country.where(name: appointment_params[:country_id]).pluck(:id).first if appointment_params[:country_id].to_i == 0
@appointment = Appointment.new(appointment_params)
時,我打「N」並按回車鍵,就步入User.where聲明
我不知道什麼可能導致這一點,任何想法?
你在哪裏設置斷點?測試/實現代碼是什麼?請提供更多信息。 –