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
末
我怎样才能解决这个?
谢谢。