0
剛開始使用databasedotcom寶石,現在卡住了。databasedotcom錯誤沒有找到記錄
當試圖找到憑身份證在Salesforce的記錄,如果ID /記錄不存在,它產生以下錯誤:
「提供的外部ID字段不存在或無法訪問:」
如果Id確實存在,我可以繼續使用我的頁面。
這裏是我的代碼:
def search
@account = Account.find(params[:id])
if @account.Id
redirect_to new_user_registration_path(:id => @account.Id)
elsif params[:id].to_s.present? and @account.nil?
flash[:alert] = "Couldn't find that one. Please check and re-submit your number."
redirect_to search_path
end
末
我怎樣才能解決這個?
謝謝。